language : add the languageSubTag function to the HTML tag

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2264 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-08-20 13:29:00 +00:00
parent 52b55e7ad3
commit 2106eaf93d

View File

@@ -340,4 +340,12 @@ class language
throw new Exception ("No language available for '$languageCode'", 500);
}
}
/** Return the language subtag for the language
http://www.iana.org/assignments/language-subtag-registry/
language-subtag-registry*/
public function languageSubTag ($languageCode)
{
return str_replace ("_", "-", $languageCode);
}
}