pysepal.i18n.loading.discover_locale_codes#

pysepal.i18n.loading.discover_locale_codes(folder)[source]#

Return the locale codes folder ships, English first.

Parameters:

folder (Path) – The message directory holding one subdirectory per locale.

Returns:

("en", ...) with the remaining codes sorted, so the order does not depend on the filesystem.

Raises:

CatalogError – There is no readable en directory that ships at least one message file, or two directories normalise to the same locale code.

Return type:

Tuple[str, …]