forked from I2P_Developers/i2p.i2p
* Router Console translation infrastructure:
- Persistent lang setting with routerconsole.lang=xx
- Loading any page with ?lang=xx changes the persistent setting
- Add a custom Jetty handler to load foo_xx.jsp if it
exists for language xx. This is for jsp files with lots
of text in them. Otherwise use inline translate methods.
Not for included jsps.
- Add a script to create and update messages_xx.po translation
files, and create ResourceBundles from them
- Add class to translate strings from cached ResourceBundles
- Add translate wrappers to HelperBase, FormHandler, and *Renderer,
so calls can be made from both jsp and java files
- Add two example translations on configupdate.jsp - one in
the jsp itself and one in the helper.
- This is for strings in routerconsole only. Will be expanded
to other webapps and the router later.
This commit is contained in:
@@ -22,4 +22,10 @@ public class CSSHelper extends HelperBase {
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/** change default language for the router but don't save it */
|
||||
public void setLang(String lang) {
|
||||
if (lang != null && lang.length() > 0)
|
||||
_context.router().setConfigSetting(Messages.PROP_LANG, lang);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user