Home › Forums › WoodMart support forum › Loco Translate parent theme or child theme?
Loco Translate parent theme or child theme?
- This topic has 3 replies, 2 voices, and was last updated 2 years, 1 month ago by Elise Noromit.
-
AuthorPosts
-
November 13, 2022 at 2:15 pm #420709
markusParticipantHi there,
I read in the documentation that some parts of the Theme are best translated wich Loco Translate. This is not for a multi-lingual shop but to translate terms from the WoodMart theme from English into the shop language German.
First question
When I have a WoodMart child theme, do the Loco translations go to the parent theme or child theme?
Of course I don’t want the translation to be overwritten by a WoodMart theme update.I tested it and realized the following:
Term translated in Loco Translate parent theme → it shows the translation in parent theme and child theme
Term translated in Logo Translate child theme → it shows the translation in parent theme and child themeDoes this mean it’s the same source and it does not matter where I add the Loco Translation?
Second question
That is more a Loco Translate question, perhaps you can help here as well. I add the German language which is based on woodmart-de_DE.po. I can store the .po-files in the following locations. This can be applied to parent theme and child theme.1) languages/themes/woodmart-de_DE.po
2) themes/woodmart/languages/de_DE.po
3) languages/loco/themes/woodmart-de_DE.poIn here you say that 3) languages/loco/themes/woodmart-de_DE.po should be chosen. I currently have it in 1) languages/themes/woodmart-de_DE.po. I don’t know what difference it makes. I think it’s only important that the translation files are not in the theme folder.
https://xtemos.com/docs-topic/translate-woodmart-theme-with-loco-translate/TL;DR: I want to be able to do translations of terms without it being overwritten by any update (WoodMart Theme update, Loco Translate update). I also need to know if the translation goes to the parent or child theme, as it looks like there is no difference when the PO files are anyway not saved in the theme folder.
How to set it up the right way? And where to add the translation strings?
Thanks
MarkusNovember 14, 2022 at 7:24 am #420818
Elise NoromitMemberHello,
You need to translate the parent theme. Here is a video tutorial that should help you translate your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3
Please check the video tutorial to see how to save the translation file correctly. You can remove the plugin and translations would remain. Also, translations would remain after each theme update.
In order to translate the WooCommerce strings, you need to create a separate translation in Loco > Plugins > WooCommerce in the same way as shown in the video.
Best Regards
November 14, 2022 at 11:59 pm #421096
markusParticipantHi Elise,
most of the things are clear except that you said I should add it to the Parent Theme.
Can you check if you have the same or a different text-domain in the Loco Translate settings for WoodMart vs. WoodMart Child?
Loco Translate → WoodMart → Advanced
/wp-admin/admin.php?bundle=woodmart-child&page=loco-theme&action=confLoco Translate → WoodMart Child → Advanced
wp-admin/admin.php?bundle=woodmart&page=loco-theme&action=confIn my setup I have the same text-domain “woodmart” on both themes (WoodMart and WoodMart Child).
So on my setup both (parent theme and child theme) access the very same PO file.
I can translate a string in WoodMart and it’ll be automatically also in WoodMart child (and the other way round).Is this a big issue? How is you set up when you use WoodMart and WoodMart child theme?
Thanks again
Markus
Attachments:
You must be logged in to view attached files.November 16, 2022 at 4:02 am #421417
Elise NoromitMemberHello,
You see the list of themes you just need to create the translation for the theme. You would better study the Loco Translation plugin documentation.
When you install the plugin the parent themes are shown by default.
You need to remove the child theme translation.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register