Tagged: child theme, translation
-
AuthorPosts
-
July 15, 2018 at 10:05 pm #985764
Hi there!
I’m working on a site that is in portuguese (pt-br) and I’m using child theme.
I followed the instructions on https://kriesi.at/documentation/enfold/translation/ about how to make Enfold read the language files in a child theme, but I’m still having problems.
I’d tried using this function that I saw in https://kriesi.at/support/topic/theme-update-and-child-theme/#post-140430:add_action('after_setup_theme', 'avia_lang_setup'); function avia_lang_setup() { $lang = get_stylesheet_directory() . '/lang';<br /> load_child_theme_textdomain('avia_framework', $lang); }
… and it didn’t worked also.
If you go to my site and try to search something like “asdfasdasdas”, forcing to not find anything, the message is still in english. The same thing on the search page results.
I did the translation using POEDIT and I have put both files (.PO and .MO) in to enfold-child/lang.
What I’m doing wrong? :(
Thanks for helping!
Regards!
July 16, 2018 at 9:20 am #985868Hey emaruxo,
Thank you for using Enfold.
You can use this plugin to translate the strings or texts.
// https://wordpress.org/plugins/loco-translate/
The language file (.po) may not contain the updated lines so manual translation may not work properly.
Best regards,
IsmaelJuly 16, 2018 at 12:17 pm #985906and by the way – what should a linebreak in a code-block do?
this is the code for the path to your child-theme/lang folder to activate for child lang filesfunction language_file_child_theme() { $lang = get_stylesheet_directory().'/lang'; return $lang; } add_filter('ava_theme_textdomain_path', 'language_file_child_theme');
do not forget to empty all cache you use (browser cache, enfold merged files, other plugins)
July 18, 2018 at 8:52 pm #987175Thanks for helping Ismael and Guenni.
The Loco Translate plugin worked very well.
Regards!July 19, 2018 at 12:50 pm #987362Hi,
Awesome! Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
Don’t forget to bookmark Enfold Documentation for future reference.Thank you for using Enfold :)
Best regards,
Ismael -
AuthorPosts
- The topic ‘Translation – Child Theme’ is closed to new replies.