aboutsummaryrefslogtreecommitdiffstats
path: root/langs.inc.php
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2014-11-30 16:27:34 +0100
committerfilip <filip.komar@gmail.com>2014-11-30 16:27:34 +0100
commit070c7f127bc814ad6123df4d643df2e50b907886 (patch)
tree58f26f3b493655dcbd7c0c1e3e166a3d4fc5b218 /langs.inc.php
parentde66e8b545d769161bbf41e518ccd5b60172b985 (diff)
downloadwww-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.php20
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)
{