// JavaScript Document
/**
* global translations
*/
var translations = {
 "fr" : {
"/images/welcome/bulle_brief_me_en.png":"/images/welcome/bulle_brief_me_fr.png",
"/images/welcome/bulle_corporate_en.png":"/images/welcome/bulle_corporate_fr.png",
"/images/welcome/bulle_apps_en.png":"/images/welcome/bulle_apps_fr.png",
"/images/welcome/bulle_webwag_portal_en.png":"/images/welcome/bulle_webwag_portal_fr.png",
  "hello" : "bonjour",
  "blue" : "bleu",
  "Lastest News" : "Dernières News",
  "Join us on" : "Retrouvez nous sur",
  "Webwag publishes aggregation solutions for applications and content used by SFR, Orange, Nokia, Sony Ericsson and LG. Brief me (http://www.briefmeapp.com) is the Alert Machine evolution with a brand more simple and easy to read news and social media. With a topics-oriented approach, Brief me allows alerts aggregation on mobile and transforms any blog or site into alerts sources. Webwag sells solutions to help the media on mobile with success and has among her customers the groups Mondadori, Marie-Claire, AFP and many others." : "Webwag édite des solutions d'agrégation d'applications et de contenus utilisées par SFR, Orange, Nokia, Sony Ericsson et LG.</br> Brief me <a href='http://www.briefmeapp.com' class='link'>(http://www.briefmeapp.com)</a> est l'évolution d'Alert Machine, c'est un lecteur intelligent d'actualité et de réseaux sociaux. Avec une approche orientée par thèmes personnalisables Brief me permet d'agréger les alertes sur mobile et de transformer n'importe quel blog ou site en sources d'alerte. Webwag commercialise également des solutions pour accompagner les médias sur mobile avec succès et compte parmi ses clients les groupes Mondadori, Marie-Claire, l'AFP et bien d'autres.",
 "COMPANY":"SOCIETE",
 "COMMUNITY":"COMMUNAUTE",
 "DEVELOPERS":"DEVELOPPEURS",
 "Products &amp; services":"Produits et services",
 "Latest news":"Dernières Nouvelles",
 "Contact us":"Contact",
 "Corporate information":"Informations corporate",
 "Webwag on your mobile":"Webwag sur mobile",
 "Webwag on iPhone":"Webwag sur iPhone",
 "Users' forums":"Forums utilisateur",
 "Webwag blog":"Blog de Webwag",
 "Firefox tools":"Outils Firefox",
 "APIs and documentation":"APIs et documentation",
 "Developers' forums":"Forums développeurs",
 "30 seconds widget":"30 secondes widget"
  }
}
 
 /**
 * Gets the browser language
 * @return string ln
 */
 function getLang() {
	 var lns   = ["en", "fr"];
	 var ln    = "en";
	 var browserLn  = navigator.language || navigator.userLanguage;

	 for (var i = 0; i < lns.length; i++) {
	  if(browserLn.indexOf(lns[i])>-1) {
	   ln = lns[i];
	   break;
	  }
	}

	return ln;
 }
 
 /**
 * translate a string
 * @param word to translate
 * @return translation
 */ 
String.prototype.t = function() {
	var ln = forceLn || getLang();
	
	if (translations[ln] != undefined) {
		return translations[ln][this];
	}
}

