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

Automatically detect PT-BR (Issue #181) #182

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

Quenix
Copy link

@Quenix Quenix commented Aug 28, 2020

This is a workaround to automatically detect languages added with country sufix in lang code

This is a workaround to automatically detect languages added with country sufix in lang code
@Quenix Quenix closed this Aug 28, 2020
@Quenix Quenix reopened this Aug 28, 2020
@Quenix
Copy link
Author

Quenix commented Aug 28, 2020

I've tried to link this to the issue but I failed, sorry! If accepted I will manually close the issue! Thank you

@thomaspark
Copy link
Owner

Hey @Quenix, thanks for the PR! Looks like it's on the right path.

How about instead of keeping a hard-coded list of languages, we check if the hyphenated language code exists in messages.languageActive first, if not we continue with the split language code? We wouldn't have to maintain a list that way.

@Quenix
Copy link
Author

Quenix commented Sep 2, 2020

Hey @Quenix, thanks for the PR! Looks like it's on the right path.

How about instead of keeping a hard-coded list of languages, we check if the hyphenated language code exists in messages.languageActive first, if not we continue with the split language code? We wouldn't have to maintain a list that way.

Sounds way better! Thanks, I will try improving it!

@thomaspark
Copy link
Owner

Hey @Quenix, have you had any progress with this? Let me know if you have any questions about the code or would like me to take over.

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