diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-08-17 14:13:01 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-08-17 14:13:01 +0000 |
commit | da48cc763775981904730c87ce0524c67cc611e0 (patch) | |
tree | ea8ae692f3f97ca04acd3d33f9882e506e59cd99 /lib/t | |
parent | 399b91bbca4997fbbbf36a06649be15dd53fd2c2 (diff) | |
download | www-da48cc763775981904730c87ce0524c67cc611e0.tar www-da48cc763775981904730c87ce0524c67cc611e0.tar.gz www-da48cc763775981904730c87ce0524c67cc611e0.tar.bz2 www-da48cc763775981904730c87ce0524c67cc611e0.tar.xz www-da48cc763775981904730c87ce0524c67cc611e0.zip |
Fix language redirection (see bug 7091)
- modify relocate() function in langs.inc.php
- modify ChooseLocale class constructor in localeDetection.class.php
- we currently use ll-cc language tag format (instead of ll-CC,
which ChooseLocale strictly expects until now)
Diffstat (limited to 'lib/t')
-rw-r--r-- | lib/t/03_lang_redirection.t | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/t/03_lang_redirection.t b/lib/t/03_lang_redirection.t new file mode 100644 index 000000000..cb799c71b --- /dev/null +++ b/lib/t/03_lang_redirection.t @@ -0,0 +1,13 @@ +<?php + +require realpath(__DIR__ . '/../testmore.php'); +require realpath(__DIR__ . '/../../langs.inc.php'); + +plan('no_plan'); + +diag('Testing langs.inc.php functions.'); + + +is(relocate($langs, null, 'en', 'en'), '/en/'); +is(relocate($langs, null, 'en', 'pt-BR,pt;q=0.8,es;q=0.6,en-US;q=0.4,en;q=0.2'), '/pt-br/'); + |