Skip to content

Commit a0e5745

Browse files
author
Ernestas Staugaitis
committed
Some document have non-standard locale code
1 parent 733f845 commit a0e5745

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/PhpWord/Style/Language.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ public function getBidirectional()
228228
*/
229229
private function validateLocale($locale)
230230
{
231+
$locale = str_replace('_', '-', $locale);
232+
231233
if (strlen($locale) === 2) {
232234
return strtolower($locale) . '-' . strtoupper($locale);
233235
}

0 commit comments

Comments
 (0)