pysepal.solara.locale.describe_offered_locales#
- pysepal.solara.locale.describe_offered_locales(offered, catalog)[source]#
Pair each offered locale code with a display name and flag.
offeredcomes from the app’s message folders and is authoritative: every code is returned, because a catalog the app ships must be selectable.catalogonly supplies presentation, matched throughmatch_offered_locale(), so a bareesborrows the name and flag ofes-ESwhile keepingesas its value – the value is a folder name thatTranslatorhas to be able to find.- Parameters:
offered (Iterable[str]) – Locale codes the app has catalogs for.
catalog (Iterable[Dict[str, str]]) – Display records, each with
code,nameandflag.
- Returns:
One record per offered code, sorted by display name.
- Return type:
List[Dict[str, str]]