diff options
author | filip <filip.komar@gmail.com> | 2014-11-30 16:27:34 +0100 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2014-11-30 16:27:34 +0100 |
commit | 070c7f127bc814ad6123df4d643df2e50b907886 (patch) | |
tree | 58f26f3b493655dcbd7c0c1e3e166a3d4fc5b218 /langs.inc.php | |
parent | de66e8b545d769161bbf41e518ccd5b60172b985 (diff) | |
download | www-070c7f127bc814ad6123df4d643df2e50b907886.tar www-070c7f127bc814ad6123df4d643df2e50b907886.tar.gz www-070c7f127bc814ad6123df4d643df2e50b907886.tar.bz2 www-070c7f127bc814ad6123df4d643df2e50b907886.tar.xz www-070c7f127bc814ad6123df4d643df2e50b907886.zip |
First push of report about differences between Transifex and our git repository
Diffstat (limited to 'langs.inc.php')
-rw-r--r-- | langs.inc.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/langs.inc.php b/langs.inc.php index 5e9dceab5..4826b4ecf 100644 --- a/langs.inc.php +++ b/langs.inc.php @@ -118,6 +118,26 @@ function locale_hyphen_underscore($locale, $version_of_locale_uppercase = false) /** + * Create string pt-br from string pt_br or pt_BR and alike but leave the rest as is + * Return string. + * Do not exit the process. + * + * @param string $locale which we want to change + * + * @return string +*/ +function locale_underscore_to_hyphen($locale) +{ + preg_match("/(..)(_)(..)/", $locale, $parsed_locale); + if(isset($parsed_locale[3])) { + return $parsed_locale[1] . '-' . strtolower($parsed_locale[3]); + } else { + return $locale; + } +} + + +/** */ function show_langs($langs) { |