Automate

 View Only
  • 1.  Translate Reference Lists

    Posted 11-11-2024 09:33

    Hello,

    I'm needing to translate my Evolve 24.0 forms to include a Spanish translation.  I'm using an Azure translation service, and it is working fine for the field names.  It also works with drop downs / combo boxes where I've defined the range manually.  The issue I'm having is that I have several drop downs or combo boxes that I'm populating the range from a Data Connection with a Reference List that I'm pulling.

    Before I go recreating these ranges I wanted to see if there is something I'm missing.  Is there a best practice or step to translate reference lists in the forms that I should attempt first?  Example below:



    ------------------------------
    Jamie Eberhart
    Sr Technical Data Analyst
    DS Technology Hub LLC
    MI
    ------------------------------


  • 2.  RE: Translate Reference Lists

    Employee
    Posted 11-12-2024 06:27

    Hi Jamie

    Great you got everything translated but the data sources so far!

    For that, you'd want your data source to have a language key, and in the form you can use $form.language to filter the list - here is the doc

    https://help.precisely.com/r/Automate-Evolve/Latest/en-US/Automate-Evolve-User-Guide/Solution-Developer-Help/JavaScript-Reference-Guide/Composer-JavaScript-form-functions

    so a simple example of a data source with fields Language and Value

    EN one

    ES uno

    You would filter based on the users language - $form.language - and they would see "one" if EN and "uno" if ES.

    Hope that helps,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------



  • 3.  RE: Translate Reference Lists

    Posted 12-03-2024 13:32

    For some reason I'm unable to get this to work.  Can you take a look at it for me? I believe I've followed the instructions correctly.  I've tried the lang as lower case and upper case and it still fails.  I was able to have a field when I typed into it as en or fr it would filter the drop down.  I'm not sure where the issue is but I was thinking it was having issues using the $form.language in the filter criteria for the drop down.



    ------------------------------
    Jamie Eberhart
    Sr Technical Data Analyst
    DS Technology Hub LLC
    MI
    ------------------------------



  • 4.  RE: Translate Reference Lists

    Posted 12-03-2024 13:50
      |   view attached

    Attached both are in the zip folder now



    ------------------------------
    Jamie Eberhart
    Sr Technical Data Analyst
    DS Technology Hub LLC
    MI
    ------------------------------

    Attachment(s)

    zip
    Translastion Testing.zip   27 KB 1 version


  • 5.  RE: Translate Reference Lists

    Employee
    Posted 12-03-2024 13:55

    HI James

    Will take  a look at what you sent but it may not be until later in the week.

    As a super quick test, I just created a form and set a variable to $form.language.  It comes out in lower case

    so you could use the toUppseCase function like: toUpperCase($form.language);  and then use that to filter your data if you are using EN.

    FYI

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------



  • 6.  RE: Translate Reference Lists

    Employee
    Posted 12-04-2024 12:15

    Hi Jamie

    I don't see the reference data list in your solution nor the form language being used to filter it.  Just a label and first and last name fields.

    The reference data list would need to contain values for a dropdown for example, which I think you have

    So add that as a data connection to your solution

    So set a variable to $form.language

    then use that to filter your list - range for the dropdown filtered by the browser language

    result is with my browser language 'en' I see this

    if you change your browser to french, you'll see the french options.

    Hope that helps,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------



  • 7.  RE: Translate Reference Lists

    Employee
    Posted 12-04-2024 12:25
      |   view attached

    PS: attaching your example with my updates - please see my comments on what you need to do for your other solution to use this method to show values in the browser language.



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------

    Attachment(s)

    zip
    test translation.zip   23 KB 1 version


  • 8.  RE: Translate Reference Lists

    Posted 12-04-2024 13:29
      |   view attached

    My apologies, I must have zipped the wrong file. Please see the attached.  This suggestion still doesn't work as the default value for a language field does not update when the language is changed. I'm also curious as to why the Precisely documentation you originally referenced doesn't mention a helper field for the language.  Is it outdated? It seems to be calling the variable directly in the Filter Criteria for the drop down.



    ------------------------------
    Jamie Eberhart
    Sr Technical Data Analyst
    DS Technology Hub LLC
    MI
    ------------------------------

    Attachment(s)



  • 9.  RE: Translate Reference Lists

    Employee
    Posted 12-04-2024 13:41

    Hi Jamie

    I just tried your new version and it works for me - but I was just overtyping the language.  I don't have time to swap browser languages.

    As for setting a field to $form.language, it's just a good idea.  The filter for the dropdown allows you to pick a field - not a formula builder for variables or doing any type of calculations or settings.

    So I always use a "helper" field to hold the value I want to filter on, like language or anything else that may be a filter.

    Having said that, you can type in a variable or value in this box

    and I tried it and it worked.  But again, I always use another field, what I call a helper field.

    Hope that helps,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------



  • 10.  RE: Translate Reference Lists

    Employee
    Posted 12-04-2024 13:47

    FYI to double check I changed my browser language to French and see this

    So it works either way - filter and type $form.language or set it to a helper variable.

    Cheers,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------