Piwigo / piwigodotorg

This is a Piwigo plugin which manage pages of piwigo.org (yes, piwigo.org is partly built on top of Piwigo)

Home Page:https://piwigo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Confusion between br (breton) and pt_BR

tornoz opened this issue · comments

Code has a hack to make an equivalent between .br and pt_BR language.

// specific case for pt_BR, let's say it's "br" to make things simpler

TLD names use ISO 3166-1 alpha-2 country codes while language code use ISO 639-1.
They are not the same norm and should not be used together. This can creates mistakes, one of them is breton language (br) being detected as the language spoken in Brasil.

Due to this, the website asks users with breton in their Accept-Language header to translate the website in brasilian portuguese, when it should not, and should show the message for the language that is next in line in the header (usually 'fr')