Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.25 KB

TRANSLATING.md

File metadata and controls

42 lines (32 loc) · 1.25 KB

Overview

When a JX program is started, it looks in /usr/lib//string_data and ~/./string_data to find a file name matching the locale or language. (The app signature is passed to the JXApplication constructor.) The files are loaded in the following order:

  1. /usr/lib/<signature>/string_data/no_NO
  2. /usr/lib/<signature>/string_data/no
  3. /usr/lib/<signature>/string_data/default
  4. ~/.<signature>/string_data/no_NO
  5. ~/.<signature>/string_data/no
  6. ~/.<signature>/string_data/default

This ensures that default is available for any text that has not been translated and that the user's data overrides the system data.

Fonts

Different languages may require different font sizes. JX supports the following configuration values embedded in the string data:

  • NAME::FONT
  • SIZE::FONT
  • SIZE::ROWCOLHDR::FONT
  • NAME::MONO::FONT
  • SIZE::MONO::FONT

These control the default fonts and sizes displayed by the program. Users can also override these values if they need bigger fonts for easier reading.

Testing

You can test your layouts by running your application with the --pseudotranslate option.

Refer to DYNAMIC_LAYOUT.md for information on how layouts are adjusted to fit content and font size.