Skip to content

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