on 12-15-2006 9:29 AM
Hi
I am going to change a ESS based webdynpro "LeaveRequest" supplied by SAP.But when I synced to my NWDS the texts inside the view's are german language.How to change it to english ?
We know that we can change the language of local webdynpro project by changing the <Properties> tag of .tssalinfo file of the project.
Thanks
Ananda
Hey
Any Experts please reply
Ananda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I never used SAP standard for language for this reason, and because it need logoff e logon the user, for get effective the portal language.
I do this with a my custom method, that launch when is necessary on wdModify.
And use IScope (session variable) for get user language choice.
I have the language file where i wish, into project MIMEs, into KM folder (in this case, my customer can change when want the translation) and same into DB, binary field.
It is a bit elaborated, but works good for me.
The idea is give specific ID to each UIelement, the unlucky is i haven't had the time to find a way to set the TEXT propoerty of a generic UIelement.
So i do this with specific casting of object, and use particular ID for each type of UIelement.
Look the code and maybe understand better
public void SetLabelsText( com.sap.tc.webdynpro.progmodel.api.IWDView IWDView, java.util.Vector ViewIDs )
{
//@@begin SetLabelsText()
int i, n;
String id_tx = new String("");
String value_tx = new String("");
//V1C01
i = 0;
// n = ViewIDs.size();//wdThis.Get_Num_Label();
n = Language_Props.size();
Enumeration enum = Language_Props.propertyNames();
for (; enum.hasMoreElements(); ) {
try {
id_tx = (String)enum.nextElement();
value_tx = Language_Props.getProperty(id_tx);
switch (id_tx.charAt(0)){
case 'b':
IWDButton BtnEl = (IWDButton) IWDView.getElement(id_tx);
BtnEl.setText(value_tx);
break;
// case 'E':
// IWDTextView TextEl = (IWDTextView) IWDView.getElement(id_tx);
// TextEl.setText(value_tx);
// break;
case 'c':
IWDCaption CaptEl = (IWDCaption) IWDView.getElement(id_tx);
CaptEl.setText(value_tx);
break;
case 'k':
IWDCheckBox CheckEl = (IWDCheckBox) IWDView.getElement(id_tx);
CheckEl.setText(value_tx);
break;
case 'l':
IWDLabel LabEl = (IWDLabel) IWDView.getElement(id_tx);
if (value_tx.indexOf(";")>0) {
LabEl.setText(value_tx.substring(0,value_tx.indexOf(";")));
LabEl.setTooltip(value_tx.substring(value_tx.indexOf(";")+1,value_tx.length()));
} else {
LabEl.setText(value_tx);
//LabEl.setTooltip(value_tx);
}
break;
}
} catch (RuntimeException e) {
//e.printStackTrace();
}
i++;
}
//@@end
}
Hi,
The text for the UI elements are in .xlf and .proprties files for each view.
The standard procedure is :
Texts in various languages needs to be generated via manual tranlation and then they are uploaded onto the DTR server.
When you sync the project from DTR, according to language of project texts will be downloaded.
I am not sure of scenario which you are telling here. May be change the language in .tssalinfo file to "en" and then resync the sources of project.
Regards,
Ashwani
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 |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.