Skip to content

i18n-embed: Regionless languages (Esperanto) #52

@fosskers

Description

@fosskers

I have software that is localized into, among others, Esperanto. The official Esperanto language identifier is eo without any region (like the -US in en-US). unic_langid can do langid!("eo") just fine, but it seems that having an eo/ directory within the i18n/ dir that i18n-embed expects isn't detected. Turning on logs, I see:

19:21:46 [DEBUG] (1) i18n_embed: Attempting to load language file: "de-DE/aura.ftl"
19:21:46 [DEBUG] (1) i18n_embed::fluent: Loaded language file: "de-DE/aura.ftl" for language: "de-DE"
19:21:46 [DEBUG] (1) i18n_embed: Attempting to load language file: "en-US/aura.ftl"
19:21:46 [DEBUG] (1) i18n_embed::fluent: Loaded language file: "en-US/aura.ftl" for language: "en-US"
19:21:46 [DEBUG] (1) i18n_embed: Attempting to load language file: "ja-JP/aura.ftl"
19:21:46 [DEBUG] (1) i18n_embed::fluent: Loaded language file: "ja-JP/aura.ftl" for language: "ja-JP"

If I change the name to eo-EO (not its real code), i18n-embed can now detect it and I see:

19:17:51 [DEBUG] (1) i18n_embed: Attempting to load language file: "eo-EO/aura.ftl"
19:17:51 [DEBUG] (1) i18n_embed::fluent: Loaded language file: "eo-EO/aura.ftl" for language: "eo-EO"

Looking in my /usr/share/i18n/locales, it seems that eo and i18n are the only two locales given that don't have a region, so it makes sense that this is an edge case. Can i18n-embed be made to support regionless LanguageIdentifiers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions