public class CustomMenusLocalizationFactory extends DefaultMenusLocalizationFactory { @Override public boolean supportLanguage(String lang) { if (super.supportLanguage(String(lang)) { return true; } else { return lang.equals("it"); } } protected String getMenuTextIt(String menuKey) { switch (menuKey) { case CLOSE: return "Vicino"; ... case CLEAR: return "Chiaro"; default: return getDefaultMenuDesc(menuKey); } } } @Override public String getMenuText(String menuKey, String lang) { if (super.supportLanguage(lang)) { return super.getMenuText(menuKey, lang); } else if (lang.equals("it")) { return getMenuTextIt(menuKey); } } }
Copyright 2006-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences