I'm trying to build an international application that can change locale dynamically on the page. I'm also trying to build a dynamic menu with labels and values that will change when the locale changes dynamically. This is what I tried:
menuModel = new DynamicMenuModel();
DefaultSubMenu inOfficeMailbox = new DefaultSubMenu("#{msg['inofficemailbox']}");
DefaultMenuItem activeItem = new DefaultMenuItem( "#{msg['activeissues']}");
activeItem.setCommand("#{mainMenuMB.loadContent('activeissues')}");
inOfficeMailbox.addElement(activeItem);
DefaultMenuItem resolvedItem = new DefaultMenuItem("#{msg['resolvedissues']}");
resolvedItem.setCommand("#{mainMenuMB.loadContent('resolvedissues')}");
inOfficeMailbox.addElement(resolvedItem);
menuModel.addElement(inOfficeMailbox);
but the menu item just come out with the literals "#{msg['blahblah']}". Where msg is the localization variable. Obviously the EL is not evaluated so the localization doesn't work. What should I do instead?