Skip to content

Basic Concepts (Theory of Operation)

Jim Kring edited this page Mar 6, 2018 · 1 revision

Here's the basic concepts for how the JKI Simple Localization tool works, at a high level.

  • There's a Localization File (JSON) that contains a "phrase dictionary" of translated phrases for several languages.
  • When you initialize the API, it loads the dictionary (you pass in the path to the file)
  • Register VIs of the Front Panels you want to have localized
  • Set the active language via the API, which will update the Front Panels of the registered VIs
  • Note that the control and indicator labels are the keys to the phrase dictionary, the captions are part that is localized
    • This is because LabVIEW doesn't allow changing control or indicator labels text during run-time (only at edit-time), so we made the label the key.
    • Also supports changing:
      • Boolean text
      • Listbox and ring text (Combo Box text?)
      • Others…
  • You can dynamically localize your dialog and other text using Get Localized Phrase VI in the API.
    • Note: The value of string controls and indicators will NOT be localized by the Set Language function — developer does this programmatically using the Get Localized Phrase VI.
  • You can generate your first dictionary JSON file for a VI
    • From the VI you wish to localize, select the Tools >> JKI Simple Localization >> Localize VI menu item
    • Using the low-level API VI: Takes an array of VIs and constructs the dictionary.