What exactly I need to do to make this works?
Looking at the JWT jar (3.2.2) I see a "wt.xml" and resolved to use this as a initial template:
- Copied the file to my source directory as "wt_pt.xml" and changed the messages
- Created a new WXmlLocalizedStrings with WApplication.setLocalizedStrings
- Did WApplication.setLocale use "pt" "BR" as Locale
And nothing changes =/
I've tried WXmlLocalizedStrings.use with "wt", "wt_pt", "wt.xml", "wt_pt.xml" and even "mynamespace.wt". Still nothing changed.
What am I missing?
As a side note, I'm using CLOJURE.
RE: About Localization... - Added by Kip J Mejia 8 months ago
To translate a text in to a particular language is know as Localization. It is a process by which we can change a text to a different language and also we can add some locale-specific components. Swing supports localization in the way that when we localize an application to a particular language and run it in that specific locale then Swing pulls up the localized strings from the resource bundle. After this, the component gets resized by the layout manager. The previous example demonstrates how to localize an application.Check more info from http://cheapessaywritingservice.us/
RE: About Localization... - Added by Koen Deforche 8 months ago
Hey Rafael, it sounds like that should work.
The two calls that are important are:
WXmlLocalizedStrings bundle = new WXmlLocalizedStrings(); bundle.use("/package-path/to/wt"); app.setLocalizedStrings(bundle);
This should load "wt_pt.xml"
JWt comes with a 'form' example that illustrates these APIs.