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

Fix for an issue where languages with a dash in the string was not being selected properly #5

Merged
merged 5 commits into from
May 21, 2015

Conversation

mindblender
Copy link
Member

In addition to fixing issue #4, I refactored the dropdown code to make it more modular.

Please review and leave any comments.

Thanks!

… scrubber was removing the dash from the locale causing it to not set the language properly.

This is not ideal, but a quick hack.  This will be cleaned up in v3
… xx is a language/locale, and if one does not exist then default to English.
Reorganized the language array to make it more readable.

Refactored the language detection code to set the default language if one is not already set in the settings.php file.  Also added logic so that the app can detect the user's browser preferences and display the site accordingly.

Created a method that returns a language drop down list.  This is better than having multiple static lists in various places.

Made the includes for the various language files more solid.  It checks to see if the file exists before trying to include it.  This should intercept any errors with the include.
mindblender added a commit that referenced this pull request May 21, 2015
Fix for an issue where languages with a dash in the string was not being selected properly
@mindblender mindblender merged commit 6eb67a1 into master May 21, 2015
@mindblender mindblender deleted the bugfix/language_dropdown_issue branch May 21, 2015 01:46
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.

1 participant