cancel
Showing results for 
Search instead for 
Did you mean: 

Language dependant texts in UI-Designer

Former Member
0 Kudos

Hello,

is there a way to get the current logon language of the user (such as Context.GetCurrentUserLanguage() in ABSL) on UI-Level? Goal is to overcome the missing translation feature of text pools in the UI.

Thank you!

Best regards

Matthias Jäger

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Andreas,

thanks for your reply.

So I think the problem is that we're forced to have a BO-instance at runtime, since static actions with parameters are currently not supported. In an empty OWL we don't have a BO-instance.

Perhaps something like this in the UI-Layer might work:


var instance = BO.Create();
instance.DetermineUserLanguage(); // here the node-element for the current user language is filled

// write the userLanguage into the UI data model

instance.Delete();

But this is ABSL-Coding and we need this (not very nice) mechanism in the UI.

Any (other) ideas?

Regards

Matthias

Former Member
0 Kudos

Hi Matthias,

sorry, I can`t find any function in ruby to check the user language. Perhaps somebody else knows a function...not all functions are visible in ruby`s itellisence.

Regards,

Andreas

Former Member
0 Kudos

Hi

Since a few weeks it is possible (starting with FP30 ) to get the logon language in ruby script:

u201E$controller.GetCurrentLanguage();u201C

Regards

Stephan

Former Member
0 Kudos

Thanks Stephan for sharing this information. That sounds great.

Regards,

Andreas

Former Member
0 Kudos

Hi Andreas,

I have created Code List Data Type in SDK and have around 100 Code values and each to be maintained into 3 lang FR, ES, IT for descriptions.

XLIFF file is XML in coding and I have my values and translations ready in Excel file.

Any way to quickly get the translations from Excel into XLIFF file easily OR any shortcut in SDK that I do not have to manually keep on copy-paste each translation as target tag in this XML code of XLIFF file.

Even tools does not seems to be user friendly. Please advice with method OR tool to complete this.

Alim

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Alim,

There are some free-ware tools available for XLIFF based text.

I am using Virtaal.

HTH,

    Horst

Jacques-Antoine
Active Participant
0 Kudos

Hello Horst,

It could be a nice idea to put the plug-ins and tools that are useful to use with SAP Cloud App Studio. I am sure a thread like this with everybody giving their tools and making a list out of it would have a nice value!

Just a suggestion.

Have a nice day.

Jacques-Antoine

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Jacques-Antoine,

I've been told that SAP is not supposed to suggest some software we do not own or we do not have a contract with.

Therefore you will find only a description of XLIFF inside the docu.

But soon I will start a kind of startes guide in which I will (I hope I am allowed to) mention even some helpfull tools.

Thanks for your input,

   Horst

Jacques-Antoine
Active Participant
0 Kudos

Hello Horst,

Ok, that seems a normal rule actually.

As I only found the description, as you mentioned, I was wondering what to use. Same for a GIT Repository to version coding and solutions, which could be useful.

If you are allowed to do your guide, I am looking forward to it.

Best regards!

Have a nice day.

Jacques-Antoine

Jacques-Antoine
Active Participant
0 Kudos

Nice, Virtaal is soooo easy to use!

Trying it is adopting it!

Thank you for your help Horst... as usual !!!

Best regards.

Jacques-Antoine Ollier

Former Member
0 Kudos

Hello Matthias,

I think a workaround will be to save the current logon language in a BODL element with ABSL REUSE service Contect.GetCurrentUserLanguage(). So you can define calculation rules for each UI control:

if ($data.UserLanguage == "DE")

result = "deutscher Text"

else if ($data.UserLanguage == "EN")

reult = "english text"

else if (...)

...

end

Regards,

Andreas