Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-language in smartforms

Former Member
0 Kudos
895

Hi Experts

I have an requirement in smartforms in which I have to use more than a Language. ie., My logon language is EN and I want to Display a smartform with ENGLISH and THAI, without changing the logon language. If anyone has done / got a solution please do reply.

17 REPLIES 17

Former Member
0 Kudos
190

Hi Santosh,

chk this OSS if it can help u OSS # 42305

Former Member
0 Kudos
190

hi,

in global settings one option is there for form attributes , u select that one in which

one option is there for translating smartfirms to multiple language.

Shivaji16
Active Participant
0 Kudos
190

Hi,

In the program lines, try with SET LOCALE LANGUAGE <lang> statement..

Former Member
0 Kudos
190

No Shivaji

Its not working out.

Shivaji16
Active Participant
0 Kudos
190

Hi,

If you want the complete smartform to be printed in two different language,

probably you need to call the generated FM twice..by suitable adjusting the

language parameters...

but if you want to have some texts to be printed in two different languages

for one execution of the smartform..then create the language depend

entries in CG12 ( edit phrases transaction )

Former Member
0 Kudos
190

Shivaji

Can you tell me how I can use the CG12 transaction.

Former Member
0 Kudos
190

Hey Santosh...

Did you solve this ? we have similiar requirments can you provide some inputs ?

also I am passing all the text elements from the print program, hence the smart form language translator does not work .

please provide some inputs my query is exactly the same you asked at start, how to print multiple language text on same smart form in one execution.

thanks in advance.

Former Member
0 Kudos
190

Hi Jagannath

This is regarding the multi-language in smartforms.

What you have to do is create your own Z-table with the Foreign Language.

Now in your smartstyles give the font corresponding to the language needed.

eg., THANGSAN for Thai language.

Now in the text box use the font where you have queried the foreign langage in your variable. Thats it.

Former Member
0 Kudos
190

For printing you have to create an output device with the corresponding Font(Once you navigate thru SPAD transaction you can understand).

Hope this solves your problem.

Former Member
0 Kudos
190

Thanks Folks,

I see your logic, thanks.

What I did after my posting is something like this:-

Translated my text elements to different language Chinese in SE63( I am passing Text elements to Smart form FM from print program). If my Multi-langu flag is on, then I read the non Latin text elements by setting SET LANGUAGE lg.

After reading my text once again set the language back to EN to read remaining text SET LANGUAGE as EN. pass the text elements (lets say TXT-Chinese) and TEXT-english to the Smart form FM.

Important thing is to set the output language parameter in control options of Smart form = "Chinese" = '1'. Call the SF and output you will see both English and Chinese data.

The english text is printed if there is no Chinese translated values.

If I want to print "Product" I will set Txt-101 = Product and I also want to print chinees translated stuff "XXXXXX" so I translate it in SE63.

In my print program I read the same text element 2 times one by seting language as EN and other time by setting lang as Chinees.

Store these text elements read data in 2 variables and pass it to Smart form, also set the smart form language as Chinees in the control structure and pass to FM. It will print both.

I know this is not perfect solution but it works for Chinese. Now the new issue I am facing is it does not work for Thai. I mean it works but the whole smartform output goes beyond the page limits and also the formatting is gone. it doesn't look close to the expected page.

Any suggestions ??

Former Member
0 Kudos
190

Jagannath

Thai language(not only Thai) will workout if you do as I have mentioned. This is the standard way of doing I hope.

Former Member
0 Kudos
190

Santhosh,

I tried doing whatever you suggested but results are not in my favor. May be something I missed doing. Here is what I tried please suggest if you think I should have done in different way.

1. Created a smartstyle and few paragraphs with Courier font 9

2. Created a paragraph TH with THANGSAN font 9.

3. Assigned this style to the smart form.

4. The text element which I want to print in english I am assigning the courier paragraph.

5. The text's which I want to print in THAI I am assigning THANKGSAN paragraphs.

6. Now the we need to pass the english and thai text from the program and I am doing it.

7. Last part Language we need to pass from print program and I pass TH and I can see both English and Thai text on the smartform output but the whole invoice is screwed up. Formatting is gone some text also goes beyond the layout. THe spacing between english charcters is increase and everything is messed.

8. If I pass ENglish as language "EN" then all english text is shown proper but the Thai text will be shown as small box like you non unicoded stuff.

May be you can help if you can ellabrate little more.

Former Member
0 Kudos
190

Jagannath

Please check if u are using the correct output device. Make sure that your output device uses THSAPWIN device type. Alignment will change a bit but not as you say. Some refinement in the output devce will give you the expected format.

Also make sure you have given Thai formatting only for Thai Language specific things.

Former Member
0 Kudos
190

Santhosh,

Thanks for replying.

Well I will try giving appropriate output device if that resolves the problem but I doubt that the output divide has anything to do with formating at the preview level.

Also when I try to generate the PDF document and download it to PC it does not show thai script (forget the formatting) at least I should see the thai script but it shows as boxes. Does it has anything to do with PDF version (I am using version 7.0, so don't think even that is an issue).

Jag

Former Member
0 Kudos
190

Hi Jag

I too tried the same. Somehow PDF doesn't support Thai fonts. Till OTF data the Thai font is achieved. After that somehow the Thai Fonts becomes ASCII characters. I tried even by keeping THAI font as default font. Alas !!

But the same works for Arabic Font. Might be we have to download any patch from ADOBE for Thai font. If in case if you find any solutions do post me.

And alignment will definitely change for the change in your output device. When you use Thai Font in your device it will shrink the characters. So automatically alignment will get changed. And if possible use Helvetica font while you use Thai fonts since Helvetica doesnt give you much of alignment change. Hope your problem is resolved.

If you still have any problems in printing gimme your mail-id. I'l reply in mails.

San

Former Member
0 Kudos
190

I think we need to upload some THAI font in SAP so that while convertion of OTF to PDF we cna convert the thai charcters also. I do not have procedure for this but I think RSTXPDF2 should be used for the same. I am still working on this.

my mail id is jadhav_jagannath@rediffmail.com send me an emails so that I can get it touch with you.

Did you set up an printer for your requirment ? if yes can you send me some procedure or details how did and what all you did for the same.

thanks,

Jag

Former Member
0 Kudos
190

Hi jag ,

I am also trying the same thing but i have a problem. I have created the text module and when i enter the text module name in transaction code se63 it says object does not exist. Please help me out.

with regards,

basil hashmi