Fn!keyval and language bundles

Hello! I'm working on internationalization. I've been able to create my language bundle, and I've uploaded it into sandbox. I want to use the keyval() function to return a value associated with one of the keys in my language bundle. How do I do so? Thank you.

  Discussion posts and replies are publicly visible

Parents
  • Hi Benjamin,

    You may use fn!localBundle function ("Loads a resource bundle stored in the Appian Document Management system and returns a dictionary of label value pairs.) and pass your language bundle as an input.This function will return a dictionary for all the key value pairs defined in the language file that you will provide as an input.
    Once you have key values dictionary then you can search the values through keys.Refer the below code snippet:

    local!bundle:fn!loadbundle(
    ri!languageBundle /*the language file as per user's locale*/
    ),

    local!result: index(local!bundle,ri!key,"")

    Hope this helps!!

Reply
  • Hi Benjamin,

    You may use fn!localBundle function ("Loads a resource bundle stored in the Appian Document Management system and returns a dictionary of label value pairs.) and pass your language bundle as an input.This function will return a dictionary for all the key value pairs defined in the language file that you will provide as an input.
    Once you have key values dictionary then you can search the values through keys.Refer the below code snippet:

    local!bundle:fn!loadbundle(
    ri!languageBundle /*the language file as per user's locale*/
    ),

    local!result: index(local!bundle,ri!key,"")

    Hope this helps!!

Children
No Data