I like to translate the theme,but I am unsure about the correct steps.
The following questions came up:
1) Do I have to put my own language files into the original theme, or into the child theme that I am using?
2) Does it require to have folder sub structure underneath , or will the translated file be placed directly into ?
3) There is also another language folder with theme translations: wp-content/languages/themes, or is a prefix like required?
5) Finally, will the translations be automatically recognized, or do I have to “announce” the new language to the theme?
My .po/mo files are mostly ready, I just don’t understand the next step.
1) Translate the existing strings in the .pot file inside the languages folder and store this as a .po file with the proper language code.
(example for Germany: de_DE.po)
2) Compile the corresponsing .mo file (this is a binary file, whilst the .po file is human readable with any text editor).
3) Copy both .mo and .po into the languages folder. No sub-folders required.
4) With the next page refresh, your translations will immediately work.
Why I say 95% — There are a few strings that are not part of the .pot file. Thus, they cannot be translated.
So far, I found these ones in the sidebar:
a) The text inside the search field as well as the caption of the search button
b) The headline of the Archive widget
I switched to the WP templates. There, a) is translated, but b) is also not.
I would expect that the theme is fetching the generic strings from the WP core. This does not work for the search.
I’ll try to debug a bit further.
creating translation strings can be tricky at times and often there are a few that get missed when the .po or .pot file is created.. Any that you find, please contact me and provide a list and I will update the language file. Thanks !
I just had another brief look.
Something strange, because I am pretty sure that I translated those: underneath a post there is the navigation. the two links “next post: ” and previous post … do not appear translated here.
Please just add them with the next release, I will keep reporting as soon as I discover more. but this may take longer because I am not using each template yet.
got them…I updated my PoEdit application and regenerated the .pot file. It appears to have added several “new” strings. Contact me via Email Support from the Support page bottom menu and I will send the new file.