hello Friend,
Yes you were right, the key value pairs in the properties files are
embedded in xxxxxxxx.cache.html file in JAVA SCRIPT.
First of all I kept my properties file of three languages in our src
folder of our Project then I run and compile/browse the project. Then
i checked the js files in war folder. The entry of my key/value pairs
of proerties files were present there.
In short it embedd's my properties file data into JS.
Do you know is there any way of file handling with JS?
As you told about Dynamic I18n, I tried to test it. But I am facing
problems in that.
Do you know how to implement Dynamic I18n, Actually I created a (JSNI)
native method in a class and then called the method in my class. But
gave me an error :
[ERROR] Unable to load module entry point class
com.mypackage.client.MyEntryPoint (see associated exception for
details)
com.google.gwt.core.client.JavaScriptException: (TypeError):
'UsernameHI' is undefined
number: -2146823279
description: 'UsernameHI' is undefined
at com.mypackage.client.ui.panels.common.LoginPanel$Locale.setLanguage
(Native Method)
at com.mypackage.client.ui.panels.common.LoginPanel$Locale.access$0
(LoginPanel.java:63)
at com.mypackage.client.ui.panels.common.LoginPanel.<init>
(LoginPanel.java:101)
at com.mypackage.client.ui.panels.util.PanelFactory.getInstance
(PanelFactory.java:20)
at com.mypackage.client.ui.page.HomePage.<init>(HomePage.java:16)
at com.mypackage.client.ui.page.util.PageFactory.getInstance
(PageFactory.java:22)
at com.mypackage.client.MyEntryPoint.onModuleLoad(MyEntryPoint.java:
15)
I created this method as :
private native void setLanguage()/*-{
var langHI={
username:UsernameHI,
password: PasswordHI,
login: LoginHI,
loginBtn:LoginHI
}
}-*/;
Please help me to solve this error.....
And secondly can you imagine, how can I make this method dynamic as
Runtime I will set the key value pairs.... or atleast value pairs.
Like on language selected I will bring data from DB and set into this
native method. What do you say... Is this possible???
My doubt is for this : username:UsernameHI - If it was just array then
it was easy. but i am stuck at this colon - key value pair.... hahaha
Think about it and tell me.........
Thank you for helping............
Regards,
Bhavik.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---