• Sebastian Vuorinen
    April 10, 2017 at 3:01 am #4112

    Hi,

    We are trying to create a few custom components to work alongside the normal Spark UI controls mostly following the ‘Creating your own control’-article. I have tried to find some documentation how to properly fetch some localization resources inside a custom control, but haven’t been able to find anything on the subject.

    Is there some documentation on this or can someone point me to the right direction ?

     

    Regards,

    Sebastian

    SPARK Support
    April 14, 2017 at 9:37 am #4129

    Hi Sebastian,

    Here is a link to an article in the IBM Developer Works library that covers the topic of adding localization resources to Coach Views:

    https://www.ibm.com/developerworks/bpm/library/techarticles/1404_villegas/1404_villegas.html

    Is this what you are looking for, or are you trying to access locale information during runtime?

    Regards,

    Stephen P.

    Sebastian Vuorinen
    April 27, 2017 at 4:51 am #4233

    Hi,

    My question was more to how to access the localization resources directly from code. You might call that runtime access. Since we are talking about custom components, I’m interested in how to best use the localization features. You can access config options through this.context.binding.<option name>.get(“value”) is there something similar for localization ?

    Regards,

    Sebastian

    SPARK Support
    May 31, 2017 at 2:42 pm #4362

    Hi Sebastian,

    I have been unable to find any way to reach the Localization Resources at runtime.

    Regards,

    Stephen P.

    Canan Demir
    February 1, 2018 at 11:38 pm #4960

    Hi,

    How can I access the localization variable in the events tab of the components (button,text,etc.)
    For example, I would like to get the message ‘This field is mandatory’ in the onclick event of the button from the localization variable. Is there a way to do ? Could you help me ?

    SPARK Support
    February 2, 2018 at 9:24 am #4963

    Hi Canan,

    Localization resources are predefined for SPARK.  You would need to look through the available messages or add a new Localization Resource Bundle Group to accommodate your needs.

    One possible method to get the localization message into your code would be to add an Output Text to your Coach with a visibility of None.  Link a Localization Resource to your Coach.  Set the Text Formula configuration option to the Localization Resource value of your choice.  Then call ${Output_Text1}.getText() from your code.

    Regards,

    Stephen P.

    Canan Demir
    February 4, 2018 at 10:19 pm #4967

    Hi,

    I added an Output Text to my Coach and set the Localization Resource value of my choice and It worked, thanks.

    However, I have to validate more than 10 values. Do I have to put 10 Output Text on my Coach. Is there another way to do ?

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search