I have maintained a standard text in SO10. Now I want to convert that into other languages. The text that I have maintained is in English. I want to get the German translation of the text while passing LANGUAGE = 'DE' in FM READ_TEXT.
Is there any way to achive this without maintaing the text in different languages?
Thanks in advance.
Try like this
Maintain a translation for the above text in destination language <french, german>. To do the same, go to translation SE63.
Click on Translation -> ABAP Objects -> Other Long Texts
Enter the name of the Smart Form created earlier. Also provide the source language and Target Language to be maintained:
U need to know the other language text also and paste the text in the Target text.
You have to create manually ( i.e copy your text which is in english and convert the same text in german language ) , you can maintain the same name for both the standard text but with differnt language.while reading you can call either text in 'EN' or text in 'DE'.
Please let me know if you still need any more help.
Thanks and regards.
i dont have idea via SE16 but u can try with SE63.
You can goto transaction SE63 and translate the scripts into different languages.
In SE63, click Translation -> Long Texts -> Sapscripts -> Forms
Those language you can convert to have already been pre-installed in the system.
SE63 is the best way to translate since it offers check options.
Jissa Mathew wrote:
> In that case I need to maintain many translation of the same texts. Becose I want to translate the SO10 text to multiple languages. I'm trying to avoid that.
Anyways even if you use SE63 you need to maintain the translation for each these texts. So what is the flip side to using SO10 for translation?
I think i would agree with Suhas. Maintaining texts with different languages in SO10 doesnt seem to be much different from translating the texts in SE63 now that i think about it.
But still if you want to use SE63, someone has already mentioned the steps..
Go to translation, select appropriate object (i think its transport object) and then it gives you an option of translating whatever is there in that object.
U can create a little program in order to copy the text from main language to a target langue:
TABLES: THEAD, STXH. PARAMETERS P_TEXT LIKE THEAD-TDNAME. PARAMETERS: FR_LANG TYPE THEAD-TDSPRAS. SELECT-OPTIONS: TO_LANG FOR THEAD-TDSPRAS OBLIGATORY. DATA: T_LAN TYPE STANDARD TABLE OF T002 WITH HEADER LINE, LINES TYPE STANDARD TABLE OF TLINE WITH HEADER LINE. * Get language SELECT * FROM T002 INTO TABLE T_LAN WHERE SPRAS IN TO_LANG. * Get text SELECT SINGLE * FROM STXH WHERE TDOBJECT = 'TEXT' AND TDNAME = P_TEXT AND TDID = 'ST' AND TDSPRAS = FR_LANG. IF SY-SUBRC = 0. THEAD-TDID = STXH-TDID. THEAD-TDSPRAS = STXH-TDSPRAS. THEAD-TDNAME = STXH-TDNAME. THEAD-TDOBJECT = STXH-TDOBJECT. CALL FUNCTION 'READ_TEXT' EXPORTING ID = THEAD-TDID LANGUAGE = THEAD-TDSPRAS NAME = THEAD-TDNAME OBJECT = THEAD-TDOBJECT TABLES LINES = LINES. LOOP AT T_LAN. SELECT SINGLE * FROM STXH WHERE TDOBJECT = 'TEXT' AND TDNAME = P_TEXT AND TDID = 'ST' AND TDSPRAS = T_LAN-SPRAS. IF SY-SUBRC = 0. THEAD-TDSPRAS = T_LAN-SPRAS. CALL FUNCTION 'SAVE_TEXT' EXPORTING HEADER = THEAD INSERT = 'X' SAVEMODE_DIRECT = 'X' TABLES LINES = LINES. ENDIF. ENDLOOP. ENDIF.
If you can create the program u need to use trx SE63 in order to translate the text, create the text in other language by SO10
you need to maintain the st.text in different language manually.for your case you need to maintain it both in EN & DE with same text name.
Then you call it through function module READ_TEXT. Here you pass the language dynamically.
ref below exam:
data: i_lines type standard table of tline,
wa_lines type tline.
constants: c_langu like THEAD-TDSPRAS ,
c_name like THEAD-TDNAME value 'Name of the Text'.
c_lang = (pass the language dynamically).
CALL FUNCTION 'READ_TEXT'
CLIENT = SY-MANDT
id = 'ST'
language = c_langu
name = c_name
object = 'TEXT'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
lines = i_lines
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
loop at i_lines into wa_lines.
Hope this will solv your problems.
Thanks & Regards