January 2, 2016 at 1:08 pm
Hi, in my wp-content/themes/pinnacle_child folder, I created new templates (ex: template-contact.php), new functions (placed in functions.php) and introduced some modifications in a style.css file.
In a few support posts you suggest we use Loco Translate for adding new languages, creating new .po and .mo files. I also read I can use POEDIT.
French comes already translated with Pinnacle Premium – fr_FR.po and fr_FR.mo files are in the folder wp-content/themes/pinnacle_premium/languages/. But I need some modifications to override some strings and introduce new ones, due to my new templates.
QUESTIONS when using a child theme:
1. WHAT to put in the new .po and .mo files:
a) should the newly created .po and .mo files just have the new strings needed by my new templates as well as a few strings to override some strings already translated OR
b) should the new .po and .mo files have ALL the strings, my new ones and the ones that you supply with the theme?
2. WHERE should I put these new 2 files:
a) in the folder wp-content/languages/themes / OR
b) in the folder wp-content/themes/pinnacle_child/languages/ OR
c) elsewhere?
3. Should I ADD SOME INSTRUCTIONS to some files in order for the new strings to be taken into account,
and if so, WHAT and WHERE should it be?
a) in the function.php file of my child theme such as: load_child_theme_textdomain() ? OR
b) in the form of : add_action( ‘after_setup_theme’, function () { …
c) should I put different instruction depending onwhat and where I put in the .po and .mo files?
I have read quite a few blogs on the subject and I am just getting very puzzled…
Thanks!