|
||||||||
PHP Library for Langauge Detection and Translation
You could use a Php library to load language data from the client's browser and then modified the menu
Calling get_languages( 'data' ); returns an array of all the client's selected browser languages.
I pull the the basic language string from the first language on the list and use it to reference an
array of pre-translated menu options.
$langs = get_languages( 'data' );
$lang = $langs[0][3];
$menuHome = array("English"=>"Home", "Spanish"=>"Casa", "French"=>"Accueil");
$menuProducts = array("English"=>"Products", "Spanish"=>"Producto", "French"=>"Produit");
$menuCart = array("English"=>"Cart", "Spanish"=>"Carro", "French"=>"Chariot");
…
|
||||||||
| © Lynne Grewe |