Open sixtyseven-multimedia opened 9 years ago
That's what I tried without luck:
$domain = 'wm-settings';
$locale = get_locale();
$admin_mo = $domain.'-'.$locale.'.mo';
load_textdomain( $domain, PATH_TO_PLUGIN . 'admin/languages/' . $admin_mo );
I probably found a little issue:
add_settings_error( $this->page, 'settings_reset', __( 'Default settings have been reset.' ), 'updated' );
shouldn't this be
add_settings_error( $this->page, 'settings_reset', __( 'Default settings have been reset.', 'wm-settings' ), 'updated' );
or does the translation come from the wordpress core?
And while talking about this, could you give me a hint, how to get the language properly loaded into the gettext context? I assume, I create the .po and .mo files and place them in my plugins language folder. But what's next? load_textdomain ('wm-settings','path to proper .mo') ? How do I create the name of the .mo, i.e. wm-settings-de_DE.mo?