Skip to main content
3 of 3
Add jQuery tag, add syntax colour and some minor fix.

How to translate a mobile jQuery menu?

Drupal.t('Select a page') is not translated into another language (mobile menu) after clearing cache and translating strings through the translation menu. What should be added or changed to get translation? Theme Growth Lite (jquery.mobilemenu.js)

var settings = {
    combine: true,  //combine multiple menus into a single
select
    groupPageText: 'Main',  //optgroup's aren't selectable, make an option for it
    nested: true,                   //create optgroups by default
    prependTo: 'body',              //insert at top of page by default
    switchWidth: 480,               //width at which to switch to select, and back again
    topOptionText: Drupal.t('Select a page')    //default "unselected" state
},