You can call:
getSession().setLocale(new Locale("en", "US"))

In the Java javadocs (http://java.sun.com/j2se/1.4.2/docs/api/java/util/Locale.html) you find references to language and country codes. Language code "ta" means Tamil so that is probably not what you want. Country Taiwan is represented by county code "TW".

Switching css is fairly easy. Put this in the header:
<wicket:link><link rel="stylesheet" type="text/css" href="style.css"></link></wicket:link>
and move style.css to the same folder as HomePage.html.

Now if you want to add another locale for the stylesheet, you just add a file called style_[language code].css. No other changes needed.

Regards,
    Erik.


tbt wrote:
Hi

I have a html page called HomePage.html

<html>
<head>
<link href="Resources/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
English Taiwanese
<wicket:message key="option_id" />


</body>
</html>

and two property files called HomePage.properties and
HomePage_ta.properties.

These files hold the values which should be replaced inside the
<wicket:message> tag.
How can I switch between these property files once the user selects a
particular language inside my HomePage .java class. I also need to change
the css file according to each language.

eg:- If Taiwanese is selected it should look like <link
href="Resources/css/style_ta.css" rel="stylesheet" type="text/css" />

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to