Hi I'm new to Drupal and wondering how I would go about translating a variable with jquery. I have a two language site (English and French) and I am using Responsive Menu: https://github.com/mattkersley/Responsive-Menu. This turns my nicemenus (primary navigation) into a select box. But I'd like to translate the text from "Select a Page" so it is correct on the French version.

It is possible to send the text as an option like:

$('#nice-menu-1').mobileMenu(topOptionText ['Select a page']);

Currently I'm current calling the script in an external js file, and haven't every tried to mix php with js. So my though was to override my html.tpl.php and add an IF statement to test for language in the . Is that the best approach? What code would I use to test and how would I set up the language strings in Drupal?



unleash.it’s picture

Any help with this? It's almost the last thing I need to do to finish this site. If it helps, the site in question is http://www.aefa-afsa.org/ and if you view smaller than about 650px wide, you'll see the select menu appear. I need to get the French version to say Choisissez une page but I'm not sure how to do that with Drupal.