Urban Giraffe Support | Translation & Localization
Errors while trying to make a .mo from a .po
Hello everybody,
Thank you for this brilliant article about I18N in wordpress, but I still have troubles to finalize everything for my brand new plugin, and I hope you could help me. I have 3 questions :
- So far, I've got a .pot file and my first .po file (in french). But when I try to use msgfmt, I got the following reply:
0 translated messages, 19 untranslated messages.
My .mo is created, but inside there is just the beginning of the file .po and no messages translated. Could you telle me why?
- When the first point will be solved, where should I put my .mo file? I would like to create a "languages" folder in my plugin folder and drop everything there, but where do I have to tell my plugin that it's here?
- I didn-t get the point about the text domain. So far all my "__()" or "_e()" don't contain the text domain. Is it mandatory? Should I have to add it?
Thank you so much for your answer, I would be really appreciated !!
Nicolas

Responses
Posted 3 months ago by Administrator
Yes, you need a text domain. It seperates your strings from everyone elses.
The location of the .mo file is detailed in the article. If you want to create a languages folder then you'll need to hook into some filters to do this as WordPress only looks in one location by default.
Reply
You must log in to post.