You can integrate the Welshify plugin into your website by adding the following lines into your website’s HTML source:
[html]
<!– Ategyn Cymreigio Porwyr –>
<script type=”text/javascript” language=”javascript” src=”http://techiaith.bangor.ac.uk/cymreigio-client/cymreigioporwyr/cymreigioporwyr.nocache.js”></script>
<!—————————–>
[/html]
Welshify Source Code
The source code for the plugin is also available and is licensed according to the Simplified BSD License. The plugin has been developed with Google Web Toolkit and C#/ASP.NET.
Click here to download the Google Web Toolkit source code.
Click here to download the C#/ASP.NET source code.
In addition, this is the somewhat simple PHP code used in this site that integrates Welshify as a WordPress plugin. N.B. the source shows how the plugin is not included in English language pages
[php]
<?php
/*
Plugin Name: Cymreigio Porwyr
Description: Ategyn syml sy’n synhwyro ffurfwedd ieithyddol porwyr
Version: 1.0
Author: Uned Technolegau Iaith, Canolfan Bedwyr, Prifysgol Bangor
Author URI: http://techiaith.bangor.ac.uk
License: BSD
*/
function insert_cymreigio_gwtjs(){
$qryStr = $_SERVER[‘QUERY_STRING’];
parse_str($qryStr, $qryStrArray);
if ($qryStrArray[‘lang’] == null) {
echo ”
<!– Ategyn Cymreigio Porwyr –>
<script type=’text/javascript’ language=’javascript’ src=’http://techiaith.bangor.ac.uk/cymreigio-client/cymreigioporwyr/cymreigioporwyr.nocache.js’></script>
<!– ————– –>
“;
}
}
add_action(‘wp_head’,’insert_cymreigio_gwtjs’);
?>
[/php]