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

don't get language pt-br by default #4

Closed
mindblender opened this issue Mar 7, 2015 · 2 comments
Closed

don't get language pt-br by default #4

mindblender opened this issue Mar 7, 2015 · 2 comments
Labels

Comments

@mindblender
Copy link
Member

@mindblender mindblender commented Mar 7, 2015

It's always getting pt language.
I'm using version phpCollab v2.5. and it happened in both firefox 3.6.10, firefox 4 beta 6 and google chrome 6. i don't tryed it in another brower but i think it's irrelevant.
When i'm debugging php it's always come the correct string on variable $plng on line 209 in includes/library.php.
I've got a workaround by commenting line 213 but I think it's nice contribute and then
someone can put mine or another better solution on a stable version
Sorry for poor english.

SF Bug: https://sourceforge.net/p/phpcollab/bugs/292/

@mindblender mindblender added the bug label Mar 7, 2015
@mindblender
Copy link
Member Author

@mindblender mindblender commented Mar 7, 2015

This issue also applies to the following languages:
Chinese traditional
Czech (iso)
Czech (win1250)
Slovak (win1250)

The problem is that those languages have a dash in the name, and the dataScrubber implemented in 2.5 removes the dash, thus breaking this functionality.

mindblender added a commit that referenced this issue Mar 7, 2015
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
Copy link
Member Author

@mindblender mindblender commented May 21, 2015

This issue should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant