0

Looks like this has been introduced in WordPress 6.7 - I have the following code:

$loaded = load_theme_textdomain(MY_TEXTDOMAIN,get_stylesheet_directory() . '/languages'); // internationalization

$locale = get_locale();

The locale is correct and available, load_them_textdomain() returns true but the language in the theme is English instead of German in this case.

Using de_DE_formal for the project. Did anyone experience a similar issue? How can it fail though the language is correctly loaded and set? Help would be really appreciated.

3
  • have you tried the translation call just after the call to get_locale ?
    – mmm
    Commented Nov 18 at 11:09
  • have you checked the WP Trac for a bug ticket? Note that this isn't a discussion forum it's a question answer site, you need to phrase your question so that someone would have to write an answer that you can mark as correct, not just a reply
    – Tom J Nowell
    Commented Nov 18 at 11:13
  • @mmm Good point. The translation call fails directly after the get_locale unfortunately.
    – Blackbam
    Commented Nov 18 at 16:31

1 Answer 1

0

The comment of Tom J Nowell has pointed me into the correct direction here it looks like this is really WordPress bug: https://core.trac.wordpress.org/ticket/62337

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.