‎2009 Apr 13 12:46 PM
Hi there good people, I've got a question.
I've got a text, let's say text-001 ... now I'd like to determine it's language by code, so for example:
IF ( condition1 ) .
text-001 will be taken in language A .
ELSEIF ( condition 2 ) .
text-002 will be taken in language B .
ENDIF .
How can I achieve that? I tried
IF ( condition1 ) .
sy-langu = 'A' .
ELSEIF ( condition 2 ) .
sy-langu = 'B' .
ENDIF .
but it has no effect, because when sy-langu in one line is set to new value ... in the next line in debuger it takes the old value :(
I'd be thankful for some tip, greetings. P.
‎2009 Apr 13 1:14 PM
create text element
in english
txt-001 = attention
in german
txt-002 = achtung
IF ( condition1 ) .
text-001
ELSEIF ( condition 2 ) .
text-002
ENDIF .
‎2009 Apr 13 1:14 PM
create text element
in english
txt-001 = attention
in german
txt-002 = achtung
IF ( condition1 ) .
text-001
ELSEIF ( condition 2 ) .
text-002
ENDIF .
‎2009 Apr 13 1:34 PM
Hi,
The user gets the text objects in language ,which he uses as logon language.
You just declare your text object and then in that screen In menu Go to -> Translation .
there a popup window will come and asking for the original language and target language.
I mean you just maintian the translations for your texts of your program in different language. Then you need not have to harcode the text in different language in your program.
You can also go to se63 for translation.
hope this will help you