Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Fine Tuning › Translations › Cant get Gwangi Child to be translated
- This topic has 5 replies, 2 voices, and was last updated 2 years, 10 months ago by Manathan.
-
AuthorPosts
-
mauricioParticipant@pezweb
- 1 Topics
- 3 Posts
Greetings,
We are trying to translate our gwangi child theme but it doesnt seem to be working, only on main theme. We created the .MO compiled file and upload it to wp-content/languages/theme under the name “gwangi-es_CL.mo” and the translation only works when using main theme.
We tried several solutions but we can’t get around it. Please advice on how to translate theme. Maybe there’s another name we should use for the file, but we already tried “gwangi-child-es_CL.mo” and several others.
Please advice as soon as you can
November 18, 2021 at 04:19 #36917@themodactyl- 0 Topics
- 6603 Posts
Hi Mauricio,
Thank you for buying our theme. We hope it will meet all your expectations! 🙂
To translate a child theme, you have to name the
.po
and.mo
filesgwangi-child
, as you did. However, you need to mentioned to your WP website to take in consideration the translations of your child theme. To achieve this, you have to add to the functions.php file of your child theme the snippet mentioned in this article from Loco Translate: Child themesBe sure your support team is currently doing their best to offer the best support possible despite the high volume of requests. Please note that we provide support only during belgian business hours : Monday to friday, from 8:30 am – 5:30 pm CEST. Our response time can be up to 1 business day.
Rest assured that we will still do our best to handle your requests as soon as possible!
Thank you for your understanding. 🙂
November 19, 2021 at 09:30 #36939mauricioParticipant@pezweb- 1 Topics
- 3 Posts
Hey again..
Im sorry to inform that I can’t get it to Work… is the snippet you mentioned the one last on the post you’ve given before?
We tried but it’s not working.We have a couple doubts, for example:
gwangi.pot can be edited, but in the gwangi child folder, the gwangi-child.pot it’s empty.
We usually translate themes via main theme and place the translation on wp-content/languages/themes folder…
In this case, we did the following:
1.- We downloaded the file gwangi.pot from main theme
2.- We translate theme to gwangi-child-es_CL.mo
3.- We uploaded the file to n wp-content/languages/themes and n wp-content/themes/gwangi-child/languages
4.- We applied the code of the post you mentioned like thisfunction gwangi_child_setup() {
$path = get_stylesheet_directory().’/languages’;
load_child_theme_textdomain( ‘gwangi-child’, $path );
}
add_action( ‘after_setup_theme’, ‘gwangi_child_setup’ );What are we doing wrong??
November 20, 2021 at 00:13 #36970@themodactyl- 0 Topics
- 6603 Posts
Hi Mauricio,
We made some tests and it seems the snippet is working fine. Our best guess is that the file names are not correct.
To achieve this, you have to mention the translating files:
- In the theme → wp-content/themes/gwangi/languages/fr_FR.po
- In the child theme → wp-content/themes/gwangi-child/languages/fr_FR.po
OR
- In the common directory:
- wp-content/languages/themes/gwangi-fr_FR.po
- wp-content/languages/themes/gwangi-child-fr_FR.po
Note that in case you didn’t put the string ‘gwangi-child’ as “text domain” for the strings to translate, it won’t work.
Either modify by overloading the templates or modify the functions and change the text domain from ‘gwangi’ → ‘gwangi-child’. Please find the attached screenshot.
Hope this will help you. Let me know if you need more explanations.
Best,
November 25, 2021 at 10:38 #37068 -
AuthorPosts
Hi there,
This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!
Best regards,
The Themosaurus team.
The topic ‘Cant get Gwangi Child to be translated’ is closed to new replies.