BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  How to retrieve localized string by key and locale in a script?

    Posted Tue June 09, 2020 03:33 AM
    Hi,

    I need to retrieve a localized string by key and locale in a script, because it is posible that the user's locale is say English, but the document which will be printed is say German.

    So how could I retrieve a string by key and locale from the localization resources in a script?

    Thx,

    ------------------------------
    Laszlo
    ------------------------------


  • 2.  RE: How to retrieve localized string by key and locale in a script?

    Posted Mon July 20, 2020 09:48 AM

    Hi, 

    You can try with tw.resource.Localization_Resource_Name.Key_Name  

    Thanks, 

    Tung



    ------------------------------
    Tung Nguyen
    ------------------------------



  • 3.  RE: How to retrieve localized string by key and locale in a script?

    Posted Mon July 20, 2020 09:50 AM

    Hi, 

    You can try with tw.resource.localization_name.key.

    Thanks,



    ------------------------------
    Tung Nguyen
    ------------------------------



  • 4.  RE: How to retrieve localized string by key and locale in a script?

    Posted Wed October 07, 2020 04:44 PM
    When a CSHS loads, it retrieves the context information from the server.  When making this call, it returns only the localization strings that pertain to the user logged in.  This is done to minimize the amount of traffic.  I would recommend having translations in attached JS files and looking them up this way instead.  You will have the ability to load all languages and lookup strings as needed.

    ------------------------------
    Grant Taylor
    ------------------------------