Some document have non-standard locale code
This commit is contained in:
parent
733f845f8f
commit
a0e57459dc
|
|
@ -228,6 +228,8 @@ final class Language extends AbstractStyle
|
|||
*/
|
||||
private function validateLocale($locale)
|
||||
{
|
||||
$locale = str_replace('_', '-', $locale);
|
||||
|
||||
if (strlen($locale) === 2) {
|
||||
return strtolower($locale) . '-' . strtoupper($locale);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue