Skip to content

improve language resource resolution (BCP 47 language tags) #147

@forrestguice

Description

@forrestguice

First couple paragraphs of https://developer.android.com/guide/topics/resources/multilingual-support.html describes the problem. Consider a device w/ system locale es_US or es_MX (while the app only provides translation es_ES). When trying to resolve the language first es_ES is tried, then es, and then it finally falls back to default en_US (failing to resolve to spanish).

A quick fix would be to move the es_ES translations into es, but this is less than ideal - suppose es_UY is added later - in this case which version belongs in the fallback es (Castilian vs Latin American Spanish), and which should use the full qualifier (arbitrary choice). Or should the es_ES resources just be copied into es (ugly duplication).

Android 24+ purports to fix this situation w/ improved resolution using BCP 47 language tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions