0

I've been working with WP for quite a while now however I was never required to use translations for it - until yesterday happened.

I'm currently using the Plugin 'Theme My Login' to build a frontend interface for subscribers, which is supposed to be completely German. However, for some odd reason, about half of the error messages thrown are English and the other fifty percent are German. For example, after logging out of WordPress, the message telling you to 'log in to access this page' is german, while the login error messages (e.g. wrong password, non-existent user etc.) are english.

I've tried editing the standard WordPress language file de_DE to match my requirements as well as editing the language file that comes with the plugin, however none of the changes I make seem to have any effect on the actually displayed errors.

Could anyone of you imagine what mistake I keep making here?

Marcel
  • 674
  • 4
  • 15
  • How are you editing the de_DE file? You should be using something like [Poedit](http://poedit.net/) to make changes to the .po file. Then when you save the .po file, an .mo file should be automatically generated. – henrywright Aug 15 '14 at 11:06
  • I did use poedit to edit the files, I also saved and uploaded both files to the respective folders, however it has absolutely no effect. – Marcel Aug 15 '14 at 11:08

2 Answers2

0

Try telling WordPress where exactly to look for the language file. For example, the following assumes the .mo file is located at wp-content/languages/theme-my-login-de_DE.mo

if ( file_exists( WP_LANG_DIR . '/theme-my-login-de_DE.mo' ) )
    load_textdomain( 'theme-my-login', WP_LANG_DIR . '/theme-my-login-de_DE.mo' );
henrywright
  • 10,070
  • 23
  • 89
  • 150
  • I tried this before already. The textdomain should be loaded and my correctly named file is actually located there. This is what the errors look like: http://cl.ly/image/3W471y2o3n0Q - half of it is englihs, half german – Marcel Aug 15 '14 at 11:26
  • Could the German string be coming from outside theme-my-login? For example, you might have to translate that particular string via the WordPress .pot file – henrywright Aug 15 '14 at 11:53
  • The translated german message string is included in both .mo files, the standard de_DE.mo in wp-content/languages/ and the theme-my-login-de_DE.mo in the plugin directory. Is there some way to completely reset all language-related settings/localization files and start over from scratch? – Marcel Aug 15 '14 at 12:13
  • Yes. To do that you would just need to delete your customised .mo and .po files. Then start again with a fresh .pot file. – henrywright Aug 15 '14 at 12:19
  • I now deleted all .mo and .po files which led to all of it being english. After that I added both localization files back in. It's half-half again, even though the .po file explicitly includes the translation for the erroneous string: http://cl.ly/image/42100W3C3K3e/Bildschirmfoto%202014-08-15%20um%2014.26.59.png – Marcel Aug 15 '14 at 12:27
-1

Upload translated files in to:

/httpdocs/wp-content/plugins/theme-my-login/language

Example:

theme-my-login-tr_TR.mo
theme-my-login-tr_TR.po

delete .pot file and you should be good to go

S McCrohan
  • 6,663
  • 1
  • 30
  • 39