I'm trying to set the german language for the Wordpress backend. German is also installed and can be selected under:
Settings> General> Site Language
Unfortunately it jumps back to English when saving.
My attempts so far:
The following did not work (for me):
define('FS_METHOD', 'direct'); doesnt helpThe following did work:
Since only the theme change worked, it had to be due to the theme. So I scoured the files and found it here:
The code says, and this was confirmed to me by support when I asked, that if "Deactivate translations" is not active in the theme options, absolute is set to en_US.
function et_divi_maybe_change_frontend_locale( $locale ) {
    $option_name   = 'divi_disable_translations';
    $theme_options = get_option( 'et_divi' );
    $disable_translations = isset ( $theme_options[ $option_name ] ) ? $theme_options[ $option_name ] : false;
    if ( 'on' === $disable_translations ) {
        return 'en_US';
    }
    return $locale;
}
add_filter( 'locale', 'et_divi_maybe_change_frontend_locale' );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With