Edited text dosn’t get translated with gettext / zpfocus

I use dynamic-locale with the theme zpfocus and it works fine. I read the User guide Translating Tutorial but still wonderung
if it works as I assume :
In zp-core/locale/de_DE/LC_MESSAGES/zenphoto.po

`msgid "You are logged in"`
`msgstr "Sie sind jetzt eingeloggt"`
And to get it translated in zpfocus/password.php:

`echo gettext('You are logged in');`

Then I update the .MO file and it is done. Now my Question, when I edit the "You are logged in" and do the same steps, I get just my edited msgid, not the translation! Why? What should I do more?

Any help appreciated

Comments

  • fretzl Administrator, Developer
    Do you in fact use a translation program like Poedit or similar?

    Since you made a new string you have to run Poedit to discover this new string and be able to translate it.

    Be aware that any changes in language files will be lost again when you upgrade.
    In the translation tutorial is explained how to create theme-specific translations.
  • ayad Member
    I update .MO file with Poedit properly since I see as mentioned my fresh edited text (msgid).

    I read the translation tutorial but it doesn’t answer my simple question.
    Could you please say me, if YES I must to do something more or just a prompt NO.
    Thank you
  • acrylian Administrator, Developer
    I update .MO file with Poedit properly since I see as mentioned my fresh edited text (msgid).
    You cannot "see" anything in the .mo file directly as that is binary. What you see in Poedit or can view via a text editor is the content of the .po file which is plain text. Just to avoid confusion.

    I get just my edited msgid, not the translation!
    I am not exactly sure I understand what you get where... Gettext translates automatically if the php stuff is executed when you view the related page. You might have the html cache enabled for example. THen you need of course to clear it to see changes. Could also be the browser cache. Or that of the server, which sometimes can take a while to show the effect.

    Actually if the zpfocus theme uses the exact same term that is already translated in the standard translation file the gettext extension should be able to translate it without specifially adding it. I did see that with a lot of terms.

    I have no other idea to offer.
  • ayad Member
    thank you so much for you all.
Sign In or Register to comment.