Skip to content

Use both language and country code for auto language detection#90

Merged
elvissteinjr merged 1 commit intoelvissteinjr:masterfrom
xuan25:lang-detection
Mar 15, 2025
Merged

Use both language and country code for auto language detection#90
elvissteinjr merged 1 commit intoelvissteinjr:masterfrom
xuan25:lang-detection

Conversation

@xuan25
Copy link
Contributor

@xuan25 xuan25 commented Mar 14, 2025

Use both the language and country codes for automatic language detection.

This will be useful for languages with multiple variants where the language code alone is not capable of distinguishing between them. The code will first check if a translation file with the country code (e.g., en_US.ini) exists; if not, it will fall back to using the language code only (e.g., en.ini).

@elvissteinjr elvissteinjr merged commit e826265 into elvissteinjr:master Mar 15, 2025
@elvissteinjr
Copy link
Owner

Definitely a oversight for ISO 363 macrolanguages. The change looks good to me.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants