Column Algorithm user language dependent

Hi all. 

I need some idea to put in place a translation within a dataview. 

The dataview is quite complex, so i'll prefer a simple solution saving me the time to entirely edit all the layouts.

I have a formula as follows: 

if(a=1;"En cours";if(a=2;"En attente";if(a=3;"Envoyé";"Rejeté"))))

I know that i can eventually create an entity Status and transform the cube with numeric values into a text cube that I can localize afterward. But this will require important changes, creation of procedures etc etc, a lot of changes in layouts.... furthermore, do not have time do it like this. 

Hence, I would like to avoid it. 

Now, my question is: 

do we have a way to retrieve the language with which the user is logged in as a "substitution formula" for instance. 

To be more clear, 

i would like to be able to transform my "if" in something like 

if(lang="FR"; if(a=1;"En cours";if(a=2;"En attente";if(a=3;"Envoyé";"Rejeté"))))

if(lang="EN"; if(a=1;"In Progress";if(a=2;"On Hold";if(a=3;"Sent";"Rejected"))))

if(lang="RU"; if...... 

 

where lang can be eventually a block where i have @Language, or directly have if(@Lang... 

Is there some solution like this? or similar? 

Any idea is welcome. 

Thanks a lot in advance. 

Answers

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    50 Answers 500 Comments 250 Likes Fourth Anniversary

    Hi Andrea Masiero,

     

    the first idea that comes to my mind is assigning an attribute "Language" to the user's entity--assuming you already are using such an entity. This could be checked in an algorithm. But, the downside of this approach would be that it is more or less "hardwired" since the user cannot switch the language assigned to his entity.

    Nevertheless, I think, you'll get the idea.

     

    Kind Regards,

    Helmut

  • Do not have the entity "user" in my datamodel. 

    and again...this solution will impact the datamodel, i really do not want to. 

    I'm searching from a pure front end solution. 

    thanks indeed for your answer, appreciate it. 

    Andrea

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    50 Answers 500 Comments 250 Likes Fourth Anniversary

    Hi Andrea Masiero,

     

    then you should give the standard solution a try ;-)

    1. Build up cubes for all entities whose members shall be translated (in this case the status). Further details you can find here Localization of entity members in our help.
    2. Load the translated entity-member description
    3. Let BOARD do the rest.

     

    Kind Regards,

    Helmut

  • ok, thanks, i know very well how to use BOARD localization. 

    Maybe i was not clear, what i need is a front end only solution. 

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    50 Answers 500 Comments 250 Likes Fourth Anniversary

    Well, Andrea Masiero, as you can see here Substitution formulas, there is no variable (yet) that holds the language the user has logged on with--so, I'm afraid, there'll be no "frontend only" solution to your query.

     

    Sorry,

    Helmut

  • With BOARD the "no solution" doesn't exist. 

    I'll found out something. 

    thanks anyway

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    50 Answers 500 Comments 250 Likes Fourth Anniversary

    great, keep us posted.

  • Björn Reuber
    Björn Reuber Employee, Community Captain
    500 Likes Fourth Anniversary 100 Comments 5 Answers

    Hi Andrea,

     

    are you already using "standard" Localization within this DB (Entity Language and Localized Cubes for entities)?

    cause then, you only need to add an addiitonal entity and a cube to your solution

    Cause you could create an Entity named "UsedLang" with only one Member(keep in mind, that those should have a higher max item nr than your language entity). This member can be translated to FR, EN, DE according to the used language. With this text you can use your soltion (with the if statetements) and an additinal entity block

     

    regards

    Björn