on 06-01-2007 10:10 AM
If my application have multiple views
how do i call the ResourceBundle to convert the language
how do i set the label, textview in the properties file
Locale currentLocale;
ResourceBundle messages;
currentLocale=new Locale("en","US","");
messages=ResourceBundle.getBundle("MessageBundle",currentLocale);
Hi,
U have to load the resource bundle like this only,
IWDResourceHandler rq = WDResourceHandler.createResourceHandlerForCurrentSession();
IWDResourceHandler ra = WDResourceHandler.createResourceHandlerForCurrentSession();
rq.loadResourceBundle("welcome.resource.question",this.getClass().getClassLoader());
ra.loadResourceBundle("welcome.resource.answer",this.getClass().getClassLoader());
Sample applications,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if follow the tutorial in sap Internationalization Web Dynpro Application
it talks about modifying the xlf and changing the application properties of DefaultLocale,
after we set the DefaultLocale in webdynpro it will follow for eg EN, DE
how do we switch between this by click a button or menu inside the webdynpro
pls advice
Message was edited by:
yzme yzme
Hi,
See the below link,if u do the below application u can get clear idea.....
Hi yzme,
Try this to set Default Locale for "CHINESE"
Locale newLocale=new Locale("ZN","CHINESE");
Locale.setDefault(newLocale);
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Locale.html
http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html
Regards,
Mithu
now, i already successfully convert to chinese character....
but problem come again...
my requirement is to choose a button to switch the between english and chinese
what should i put in my coding that will reflect the changes ...
how do i set the application level locale so as to reflect the language selected
public void onActionChooseLanguage(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent ){
Locale newLocale=new Locale("en","US");
Locale.setDefault(newLocale);
wdThis.wdFirePlugRefreshOutBound();
//@@end
}
Hi,
Take Two Buttons("English" and "CHINESE") and Create Two actions("InEnglish" and "InChinese") and associate the actions with the Buttons .
Then use the code
public void onActionInEnglish(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionInEnglish(ServerEvent)
Locale newLocale=new Locale("en","US");
Locale.setDefault(newLocale);
wdThis.wdFirePlugRefreshOutBound();
//@@end
}
public void onActionInChinese(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionInChinese(ServerEvent)
Locale newLocale=new Locale("ZH","CHINESE");
Locale.setDefault(newLocale);
wdThis.wdFirePlugRefreshOutBound();
//@@end
}
Regards,
Mithu
Hi
Check his link and got some idea about your problem
http://help.sap.com/saphelp_nw70/helpdata/en/74/13453cc7f35d0ee10000000a11405a/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/21/9499f2f50ca44a85e9611f14fbdc21/frameset.htm
Regards
Chandran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i understand my problem clearer now,
if i go to ume and change my setting to DE -German and set my xlf file to de_xlf
when i logged in it reflected perfectly,
but when i change my setting to zh - Chinese and set my xlf to zh-CN_xlf,
i have no way to get chinese character , but english.
i go to the index.html ume, the language for choose the Chinese(China) is disabled
and when i login to R3 SU01 modify the user , the user selection doesn't have Chinese zh-CN but Chinese zh
what should i do
Hi,
Check the Blog below
/people/prashant.patalay/blog/2006/12/20/internationalization--i18n-of-webdynpro-java-application
regards
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.