i18n

I'm working with jspresso under Eclipse.
I specified "fr" as value of forcedStartingLocale for the front controller in frontend.xml.
When I deploy the application under a Tomcat Server, the French messages are used.
But when I launch the project from under Eclipse, either as a Swing application or as a Web application (with a Tomcat server), only English messages are used.
Any idea?

i18n

Hi,
The forcedStartingLocale is only used to translate the login GUI before the user actually logs-in. It prevents the client machine locale to be used (although it will if forcedStartingLocale is not set) thus allowing for instance to have an english login dialog on a french client machine. This is only useful for Swing and ULC frontends since when using WingS, a static, unlocalized, HTML page is used (at least in the archetype application).
 
Once the user has logged-in (through JAAS), its identity (instance of Jspresso UserPrincipal) should be completed with its preferred language (language custom property). This is achieved by the JAAS login module during the login process. When in the development phase, you will typically use the Jspresso DevelopmentLoginModule that is backend-less and reads everything from the jaas configuration file.
 
If you look at the jaas.config file you have in your project conf/ directory, this is where you can specify the language you want to use for your (unique) development user (check that the java.security.auth.login.config java system property correctly points to that file in your eclipse launch configuration). So, in your case, if you've updated the locale here (the custom.language property), the application should be translated accordingly when launched from Eclipse.
 
When you use a standalone server, you might read the jaas.config from somewhere else (for instance, you have copied jaas.config into the Tomcat conf/ directory and referenced this location in your server startup script). This is where you have to update the locale of your development user. The problem with jaas configuration is that it is JVM-wide and needs to be set-up at the startup of the application server (at least with Tomcat?). That's why you will typically have one JAAS configuration file that contains the jaas configurations of all your deployed applications, and not 1 jaas config file packaged with your application (which is fair since jaas config is environment dependent).
 
Of course, The DevelopmentLoginModule is only to be used in the development phase. Jspresso provides an LdapLoginModule that will read everything concerning the user (including its language, roles, ...) from an LDAP backend.
 
This is a strong requirement for Jspresso applications to remain as much as possible independent of their execution environment especially for i18n.
 
Hope this helps. If you ever find out that there is still a problem, don't hesitate to post back.
Best regards,
Vincent

i18n

Thank you
I totally missed the DevelopmentLoginModule with the custom.language attribute