Table Of Contents

Get Localized String (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Retrieves a string from a language-specific dictionary using a unique identifier.

    To generate a dictionary, open the VI you want to localize and click Export Strings on the Document tab. Get Localized String relies on a dictionary with the same syntax and file extension as the dictionaries generated by Export Strings.

    Programming Patterns
    You can use this node to localize strings displayed by panel objects such as dialog boxes and indicators. Your application uses these dictionaries to localize object labels automatically, so you do not need to use this node to localize those types of strings. After generating a dictionary using Export Strings, add additional entries to the dictionary for each string you want to localize. You can create copies of this dictionary and localize the strings within each entry in order to localize a VI in multiple languages.
    spd-note-note
    Note  

    If you need to export strings again after editing the original dictionary, be sure to save a copy of your edited dictionary in a separate location, as Export Strings will overwrite any existing dictionary for a given VI.

    connector_pane_image
    datatype_icon

    key

    Identifier used to locate a string in the dictionary.

    Each entry in the dictionary is associated with a key. Copy and paste the key for the string you want to localize into key.

    datatype_icon

    fallback

    String used if the node cannot find an entry that corresponds to the given key in the dictionary.

    datatype_icon

    culture

    Language of the desired dictionary.

    In most cases, leave this input unwired. If culture is unwired, the node uses the language of the end user's application and the base path to determine which dictionary to load.

    Specifying a Culture

    Wire this input if you want to specify a culture instead of using the language of the end user's application. If wired, this input must match the name of the folder on disk containing the desired dictionary in order to successfully locate the dictionary. The names of folders generated using Export Strings follow standard Microsoft locale names, such as en-US or zh-CN.

    datatype_icon

    base path

    Absolute file path to the VI from which the desired dictionary was generated.

    In most cases, leave this input unwired. If base path is unwired, the node attempts to locate a dictionary generated from the calling VI.

    The value of culture determines the specific folder in which the node attempts to locate the dictionary. Within that folder, the node attempts to locate a file with the same name as the VI specified in base path and with the suffix .strings.xml.

    For example, if base path is C:\Projects\Testing\MainUI.gvi and culture is de-DE, the node attempts to locate the following file: C:\Projects\Testing\de-DE\MainUI.gvi.strings.xml.

    datatype_icon

    localized string

    String retrieved from the language-specific dictionary.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics