-
AuthorPosts
-
March 25, 2017 at 8:20 am #766547
Where should I put translation files?
I use Endold Child.Thank you
March 25, 2017 at 10:41 am #766565Hey MORTULGAAH,
This link should help you: https://wpexplorer-themes.com/total/docs/child-theme-translation-files/
Best regards,
John TorvikMarch 25, 2017 at 1:23 pm #766586Thank you. Also – where should I upload translated files for the normal theme?
Do I just copy file somewhere, or I should also change some code? (I have translated file with poedit.)
March 26, 2017 at 8:56 am #766884Hi,
Now, you need to use an translate plugin to upload this file like the WPML or the LocoTranslate.
Ref: https://localise.biz/wordpress/plugin/beginners
Best regards,
John TorvikMarch 26, 2017 at 9:48 am #766896i allways use poedit and it works great – do not forget to mark that setting (sorry on my german Wp i only see:) “MO Datei beim Speichern automatisch erstellen” should be something like that: “Allways create a MO file automatically when saving” And do upload both files
On Enfold if you use a Child-Theme you can use this in functions.php of child theme :
and than put in your lang files in the folder Enfold-Child/lang (Same structure as in parent theme ) (i found this from Ismael9add_action('after_setup_theme', 'avia_child_lang_setup'); function avia_child_lang_setup() { remove_action('after_setup_theme', 'avia_lang_setup'); $lang = get_stylesheet_directory() . '/lang'; load_theme_textdomain('avia_framework', $lang); }
i used this code:
add_action('after_setup_theme', 'avia_lang_setup'); function avia_lang_setup() { $lang = get_stylesheet_directory() . '/lang'; load_child_theme_textdomain('avia_framework', $lang); }
But : i now have to proove it if it will work – because sinse Update to Enfold 4.0.3 i have a lot of troubles with those codes replacing Original Files in Enfold Parent Theme. (php shortcodes and javascript files) see here: Link
- This reply was modified 7 years, 8 months ago by Guenni007.
March 28, 2017 at 8:11 am #767943Hi,
@MORTULGAAH: Please create a backup of the language files that you need before updating the theme and if you’re using a child theme, just follow @Guenni007’s suggestion. \UPDATE: https://kriesi.at/support/topic/enfold-4-0-3-a-bit-buggy/#post-767934
Best regards,
IsmaelMarch 28, 2017 at 9:13 am #767987yes please – use this new snippet:
function overwrite_language_parent_theme_files() { $lang = get_stylesheet_directory().'/lang'; return $lang; } add_filter('ava_theme_textdomain_path', 'overwrite_language_parent_theme_files');
March 28, 2017 at 4:25 pm #768264March 29, 2017 at 6:47 pm #768982Ok, but where to put translation files and how to name them for Croatian language for them to work in main theme?
Thanks
March 29, 2017 at 7:24 pm #769007Hi!
Here are the language names according to WordPress
https://codex.wordpress.org/Codex:MultilingualCheers!
BasilisMarch 29, 2017 at 7:28 pm #769012I think I found a bug in Enfold. The theme didn’t want to switch to Croatian language until I have deleted all other languages.
March 30, 2017 at 1:00 am #769228 -
AuthorPosts
- You must be logged in to reply to this topic.