on 03-02-2005 5:30 PM
Hi all..
I have seen some posts by Craig and others talking about OTR. Most of my Error messages are OTRized.. but I never tested it because we didn't have a need for that..
Now we are planning to implement multiple language support for our BSP applications and I am trying to run some Tests and unable to produce the desired results.
CALL METHOD runtime->get_otr_text
EXPORTING
alias = 'ZTRACK/TEST1'
RECEIVING
text = my_mesg.
The above code ( for example ) always returns the values for 'my_mesg' in English.
My question is :
1) How do I test my BSP application in .. say .. French
I have tried to log on to my WAS box in French and also tried to Activate the Service in FRENCH with no luck..
2) Do I have to make my Labels ( for example ) as texts in OTR to use it? We are talking about 100s of texts on BSP application.. such as Labels, Push buttons etc..I am hoping this code will work..
<phtmlb:formLayoutInputField id = "fName"
pos = "col=1"
label = "<otr>First Name :</otr>"
value = "//mdl_track/LT_USR_SRCH.ZFIRST_NAME" />
or
<OTR>
<phtmlb:formLayoutInputField id = "lName"
pos = "asNeighbour,tiedTo=fName, row=+1,col=1"
label = "Last Name :"
value = "//mdl_track/LT_USR_SRCH.ZLAST_NAME" />
</OTR>
needless to say .. currently neither is working..
3) Is there any kind of installation that needs to be done to be able to run OTR on our Box.. I tried an ABAP test Program ( SE38 ) and it works only for Logon Language = EN and doesn't work if I log in with DE or FR.
REPORT ZTEST_SHAY_1 .
class CL_BSP_RUNTIME definition load.
data TEXT type STRING.
TEXT = CL_BSP_RUNTIME=>GET_OTR_TEXT(
ALIAS = 'ZBTS/ZCONGRESS_ZMGR_EVAL_ACT_ITEM' ).
write / TEXT.
Any help in this regard is highly appreciated..
Many thanks in Advance..
'Shay
PS: Our box is SAP_BASIS 620 SAPKB62043 ( SP 43)
You can test with a different language by adding it onto the url. Use sap-language. For example .../myapp/page.htm?sap-language=fr. However, you must NOT start it with a mangled URL, as the language is then already in there and your new requested language is not added.
Keep in mind that you must translate all these texts. OTR just marks the text for you and push them into translation program. Then you have to start the correct transation (I have forgotten) and exercise your French.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<i>2) Do I have to make my Labels ( for example ) as texts in OTR to use it? We are talking about 100s of texts on BSP application.. such as Labels, Push buttons etc..I am hoping this code will work..</i>
Yes, you will have to translate them all but the nice thing about otr is that you can reuse a lot textpieces
<i>1) How do I test my BSP application in .. say .. French</i>
Modify the url like Brain told you or switch the language in your internet explorer (that's what I do when I test our english translations). Go internet options->general tab->Button languages. There you can add and set the language you need.
<i>3) Is there any kind of installation that needs to be done to be able to run OTR on our Box.. </i>
No it should work right away
Further hints:
-You have to use the transaction se63_otr for translating your otrs in the different languages.
-When you are using MVC don't forget that SAP has this nice features called textpools and every class has its own textpool. It's great stuff especially for error messages (use the textpool in your controller classes).
-Take a look at craigs weblog:
/people/sap.user72/blog/2004/09/15/bsp-howto-exploring-bsp-development-and-the-miniwas-620-part-4b
Have a nice day
Thomas
Thanks All.
Craig, Brian and Thomas..
You gentlemen have a fine day as well ( or is it night? )..
'Shay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yeah!.. and feel Great.. can't wait to share it at work..
It is a pain that we have to Translate and Maintain in the required langauges..
I wish ( like the google webservice ) Altavista/babelfish put out some webservice that will do the translation for you.. Then you can dynamically maintain the Translation for Small texts ( less than 5 words )..
You are right Craig.. There are a lot of dis-advantages.
I am not even sure if the translation I did ( using some tools avaliable on the Web ) is accurate.. I remember last time I did that My Canadian French Client was upset that I was getting it all "not so right!".. But she was very patient..I guess the French speaking Canadians are very passionate about their language..
I am still trying to figure out why this is not working..
<xhtmlb:buttonGroupItem key = "addGroup"
text = "<%= OTR(ZTRACK/ADD_NEW) %>"
tooltip = "<OTR>Add New Group</OTR>"
showAlways = "TRUE" />
Ocassionally the tooltip comes back with translation..
I am still playing with it and I am hopeful I will think of something/...
Ciao ..
'Shay
I never had any problems with either type of OTR usage in 620 or 640 (and my users are usually fairly vocal when a translation is missing).
I mix the two for two main reason. When using the OTR(ZTRACK/ADD_NEW) variant you are creating a global translation in effect. The transalation will be easily reusable. But quite often what you are translating is very specific to the page in question. You don't want to clutter up your global translation area with this one-time junk. There I use the <OTR></OTR>. Then this translation is tied directly to the page/view where it is inserted. This does mean that you have to translate the elements a page at a time however.
The other reason is readability (although this is really secondary). It is similar to using text objects in regular ABAP. You can use text-001 or 'This is my Text'(001).
Thomas, your practice looks nice. actually I use OTR(Package/alias) ... Users were a little bit disturbed by SE63 and difference between short and long otr...
Transport of OTR it's strange ... Some translations will be unvisible... I have to do a $sync or $otr ...
Ok this message is to say : your practice will impact mine.
Thanks a lot
Hi there, I know how you feel.
How have you maintained the OTR values for your different languages?
To test the best way of course is to login in that language then you are sure 100%.
Try something like this code in your testing.
<phtmlb:formLayoutInputField id = "fName"
pos = "col=1"
label = "<%= otr('ZTRACK/FirstName') %>"
value = "//mdl_track/LT_USR_SRCH.ZFIRST_NAME" />
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Craig for your post.
See.. I didn't know that we HAVE to maintain ( manually ) the texts in all different Languages ( desired Lang. ).
I didn't have authorization to create a Transport request and hence couldn't really use SE63 to create Translation.
Now.. I have Maintained texts for my OTR in two different Languages.. ( although the translation is not accurate - I am still testing )..
I am not sure HOW TO TEST if that is working..
How do I log into a BSP with a different Log-on Language..
I tried logging into my 620 box with DE as Logon
I also tried concatenating my BSP URL with
?~sap-language=DE still no luck.
When I say Display OTR concept I can see two Languages that are maintained for that OTR text.
To test for Q1 and Q2 .. I need to log into the BSP with DE as my Language.. How do I do this( how to test my BSP)?
Thanks agin for your response ...
Your question solved my Q3.It is working..
>
> How have you maintained the OTR values for your
> different languages?
>
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.