Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

Commit 36f0a12

Browse files
authored
Merge pull request #46 from Yoast/fix-formal-locales-notification
Add extra check to handle formal and informal locales.
2 parents a6365af + 147647f commit 36f0a12

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/i18n-v3.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,11 @@ private function retrieve_translation_details() {
384384
continue;
385385
}
386386

387+
// For informal and formal locales, we have to complete the locale code by concatenating the slug ('formal' or 'informal') to the xx_XX part.
388+
if ( $set->slug !== 'default' && strtolower( $this->locale ) === strtolower( $set->wp_locale . '_' . $set->slug ) ) {
389+
return $set;
390+
}
391+
387392
if ( $this->locale === $set->wp_locale ) {
388393
return $set;
389394
}

0 commit comments

Comments
 (0)