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