Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support less common locale codes #283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

winrg
Copy link

@winrg winrg commented Nov 17, 2024

I've started trying to write a Toki Pona localization of Chyrp Lite. Toki Pona's language code is tok and it has no associated country, so the locale regex doesn't know what to do with it.

This PR updates the regex and uses Intl's locale parsing, if available, to check locales for validity.

It works fine, at least when I'm developing on Linux, but untested on Windows.

@xenocrat
Copy link
Owner

Hello there,

Thank you for putting together this PR and making me aware of the limitation to localization. Rather than calling Locale::getDisplayName() twice conditionally, I would prefer to relax the regex I'm using in the directory iterator. I've committed Helpers: make locales() more permissive to do that.

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