pysepal.i18n.loading.load_locale#

pysepal.i18n.loading.load_locale(folder, code)[source]#

Read and merge every JSON file of one locale.

Parameters:
  • folder (Path) – The message directory.

  • code (str) – The locale subdirectory name.

Returns:

The locale’s flattened, read-only data.

Raises:

CatalogError – A file cannot be read, is not valid UTF-8, is not valid JSON, two files produce the same flat key, or a key is both a message and the prefix of another.

Return type:

LocaleData