glassfish admin_console_localization
<<>>I want to let you know that, admin-console, and adminGUI are interchanged ><<> /><<>>frequently, and they both point to glassfish admin-console in this blog.><<> />
While working on localizing glassfish admin-console I, and the I18N team faced
a few issues, I thought it's worth blogging about it here. Glassfish
admin-console is built on top of open source projects like jsftemplating,
woodstock, and JSF. Each project has its own way of loading localized
ResourceBundle. AdminGUI and jsftemplating (which are tightly coupled) have to
abide by the restrictions set forth by woodstock, and JSF.
For JSF to load the localized ResourceBundle we've to define the supported
locales in faces-config.xml. We've defined most of the supported locales in
faces-config.xml under /lib/install/applications/admingui/adminGUI_war/WEB-INF/.
If you are localizing admin-console, and don't see the supported locale in this
file, you can always create your own faces-config.xml with your locale in it.
Make sure you package this file appropriately with your localized jar file.
For e.g. let us say your localized jar file is admin_ja.jar, when you unjar
this file, faces-config.xml file which has your locale in it, should be under
META-INF directory of this jar file. For syntax to add the locale entry in
faces-config.xml file, please look at the faces-config.xml file shipped with
admin-console. This file is under WEB-INF/ directory as I said above.
If this is done most of the admin-console messages, images, stylesheets etc.
are localized, but not the woodstock messages. To load woodstock localized
ResourceBundle, make sure you have proper woodstock localized jar file under
WEB-INF/lib directory, and the supported locale is defined as part of initParam
in web.xml under WEB-INF/ directory. For e.g. the entry in web.xml should like
this,
<context-param>
<param-name>com.sun.webui.theme.SUPPORTED_LOCALES</param-name>
<param-value>ja,fr,en</param-value>
</context-param>
If your supported locale isn't defined as part of <param-value>above, even though
the localized woodstock jar file is present, you won't see the localized
messages. If you face this problem you've to raise an issue against the core
team to include your locale in the web.xml file. The core team is working with
woodstock to remove this restriction, so that the localization team will have
the freedom of copying the localized jar file at the correct location, and see
woodstock messages localized in admin-console. In the mean time you've to work
with this restriction in place.
Glassfish adminGUI web application is shipped with English locale by default,
and the files admin_en.jar, and webui-jsf-suntheme.jar (woodstock) are under
WEB-INF/lib directory of adminGUI web app.
Posted at
09:51AM Apr 05, 2007
by cchidamb in Sun |
Posted by Abhijit Kumar on April 06, 2007 at 01:01 AM PDT #