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

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

Comments

Projects
None yet
1 participant
@mindblender
Member

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

This comment has been minimized.

Show comment
Hide comment
@mindblender

mindblender Mar 7, 2015

Member

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.

Member

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

Fix for issue #4.
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

This comment has been minimized.

Show comment
Hide comment
@mindblender

mindblender May 21, 2015

Member

This issue should be fixed now.

Member

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