on 09-17-2006 2:41 AM
Dear All,
I need a help for doing my Project Internationalization, as I am finding out some what difficulties to changes some of the Changes. Could you please help to make it as Internationalization. Please find my way of Approach, I am putting all the Hard Coded Messages into Message Pool of that Particular Webdynpro Component. Please see one of the Example below.
<u><b>For Eg:</b></u>
1. messageMgr.reportSuccess("Updated successfully");
Ans: messageMgr.reportSuccess(wdComponentAPI.getTextAccessor().getText("UPDATED_SUCC"));
<u><b>Explanation:</b></u>
UPDATED_SUCC is the Message Pool's Message Key. So i am replacing the Hard Coded Message "Updated Successfully" to wdComponentAPI.getTextAccessor().getText("UPDATED_SUCC").
<u><b>My Queries & Need Answers for the Following:</b></u>
1. submitBtn.setText("Create");
2. wdContext.currentContextElement().setHeaderText("Define Business Unit");
3.String cret = "Create";
Appreciate your Co-operation, If you could give me ASAP.
Thanks & Regards,
Satya Krishna Madasu
Hi Satya,
If i understood your requirement correctly, you want to have your messages to be Internationalized, you declare a message in the Message Pool.
Ex : - UPDATED__SUCC -"Updated Successfully" - In Message Pool.
wdComponentAPI.getTextAccessor().getText(IMessageTestWDComp.UPDATED__SUCC);
In the runtime, based on your language it will give you in the corresponding language.
Note :- For that you need to create message pool (.xlf) file for the corresponding language.
In the same way you can write for all required messages like "Create", "Define Business Unit" ...
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Satya,
In Java you can always use Resource Bundles (property files or specific objects). Plus WD gives you almost the same option with message pool + better editing / translating environment
So if you can -- use message pool for the very same purpose you are using it to display messages, i.e. kind of
wdContext.currentContextElement().setHeaderText(
wdComponentAPI.getTextAccessor().getText("HEADER_TEXT")
);
"If you can" means that you are using localized text from WD controllers (view/component/custom) or you may pass IWDTextAccessor to your custom Java classes. If you cann't (just a design choice or you reuse classes between WD/non-WD code, like exception classes) -- then use standard Java i18n/l10n API for resource bundles.
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To make the translation process smoother, you store any frequently used
language-specific texts that you have defined in the Layout editor, such as labels or table
headers, in Simple Types.
Following links will help you solve your problem.
Internationalization of Web Dynpro Applications
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/35f1e990-0201-0010-7a86-914036942779
Sample Application
Regards
Ayyapparaj
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 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.