Language files loaded in wrong priority order
-
Hello Polylang team.
In olt-manager.php around line 113, there is a comment stating “Since WP 4.6, plugins translations are first loaded from wp-content/languages”, however, the code that follows it loads text-domain files from the default location first, which, when var_dump-ing the content of the used filepath, shows the plugin folder instead of wp-content/languages/plugins.
This affects the pro version as well.
Since the comment is “languages folder first”, should that code block not read something like;
foreach ( $this->list_textdomains as $textdomain ) { // Since WP 4.6, plugins translations are first loaded from wp-content/languages // Since WP 3.5 themes may store languages files in /wp-content/languages/themes if ( ! load_textdomain( $textdomain['domain'], WP_LANG_DIR . "/themes/{$textdomain['domain']}-$new_locale.mo" ) ) { // Since WP 3.7 plugins may store languages files in /wp-content/languages/plugins if (!load_textdomain( $textdomain['domain'], WP_LANG_DIR . "/plugins/{$textdomain['domain']}-$new_locale.mo" ) ) { // Try plugin/theme location last. load_textdomain( $textdomain['domain'], str_replace( "{$this->default_locale}.mo", "$new_locale.mo", $textdomain['mo'] ) ); } } }
Thank you for your time.
Remon.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Language files loaded in wrong priority order’ is closed to new replies.