I cannot load my translation file.
What I did : a file
/theme/mytheme/traductions.php
This file contains only words and sentences to translate.
These words and sentences are used in my album.php and image.php files.
My code to display - example, based on "next"
<?php echo gettext("Site created in 2018"); ?>
Then, using my terminal, I created a pot file :
xgettext --language=PHP --from-code=UTF-8 --output=traductions.pot traductions.php
Then, I opened this pot file using Poedit, translated my sentences, added version and author, compiled the MO
it is located in
/themes/mytheme/traductions/locale/fr_FR/LC_MESSAGES/
Po file contains lines like
msgid "Site created in 2018"
msgstr "Site créé en 2018"
I tried adding my translations in index.php, but without success :
bindtextdomain('/themes/mytheme/traductions', __DIR__ . '/locale');
echo gettext("next") . "
";
echo dgettext("traductions", "Site created in 2018") . "
";
next is translated (Zenphoto translation), but not Site created (My translation.)
Textdomain is Zenphoto.
It is not clear for me how and where to add my own theme translations !