cancel
Showing results for 
Search instead for 
Did you mean: 

language translations for dynamic texts

Former Member
0 Kudos

Hi

can somebody pls help me on doing the translations for dynamic texts, for eg, I am getting some values into a checkbox group and dropdowns at runtime , these values are not stored in any .xlf files,

pls let me the know the procedure of translating these dynamic values.

appreciate your help

Thanks

RAD

Accepted Solutions (1)

Accepted Solutions (1)

former_member214651
Active Contributor
0 Kudos

Hi,

In your case, the data is loaded at run-time. for converting the text to different languages u should know the contents and only then u will be able to translate using xlf files.

Eg; - if you are aware of the dynamic text which is loaded at run time, u can add them in message pool and using the xlf file for message pool, u can convert them to different languages.

If u are getting the values at runtime thru a BAPI, then pass the language as a key to the BAPI and inform the ABAP er to return the locale specific content.

This will help u in minimizing the unnecessary effort.

Regards,

Poojith MV

Former Member
0 Kudos

Hi poojith,

thanks for your response,

how can I use this message pool in my code. I know the message pool has been used for warning messages and can be called in the application as wdcomponentAPI.getmessagemanager.reportWarning (.....)..

but in my case it is a checkbox group where fields will be fetched from a database dynamically when we run the application

for (int i = 0; i < abcprp.length; i++) {
		ICheckboxGroupElement theElement =	wdContext.nodeCheckboxGroup().createCheckboxGroupElement();
		strName = abcprp<i>.getName().toString();
                theElement.setFieldNames(strName);
		
wdContext.nodeCheckboxGroup().addElement(theElement);
}

I have got more than 50 fields which I will get from the above code..

can somebody pls explain me in the above scenario hw can we use the translation

Edited by: RAD on Sep 15, 2010 10:03 AM

Edited by: RAD on Sep 15, 2010 10:21 AM

former_member214651
Active Contributor
0 Kudos

Hi,

As mentioned in my previous reply, u cannot internationalize a content which comes from a DB. try storing the language specific texts in the DB and retrieve based on the language. DB table something like:

<DBTable>

Field ID VARCHAR2(10)

Fieldname VARCHAR2(50)

LanguageKey VARCHAR2(2)

a sample entry could be like

<DBTable>

checkbox1

entry1_en

en

checkbox1

entry1_de

de

when u retrieve the values from the DB u can pass the language key and pick up the result based on it

Regards,

Poojith MV

junwu
Active Contributor
0 Kudos

if the text is retrieved from backend, the backend should provide the translated version. you just provide the locale information. backend should handle the rest

gill367
Active Contributor
0 Kudos

hi

From the web dynpro you cannot translate the text retrieved from the backend dynamically at back end.

As directed by poojith you need to use some mechanism to fetch the langauge specific data from backend itself.

Thanks,

Sarbjeet

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi RAD,

Do you manage to resolve the issue? I'm facing similar issue to translate checkboxgroup which i'm calling dynamically and text is defined in Simple Type. But i'm getting the text which is defined in WDIniti() method .

Please can you advise me.

Thanks,

Praveen

junwu
Active Contributor
0 Kudos

Hi,

I think you can use message pool or dictionaries, they are translatable.

Best regards,

John

Former Member
0 Kudos

This message was moderated.