- This topic has 4 replies, 2 voices, and was last updated 5 years, 2 months ago by Skandha.
-
AuthorPosts
-
January 21, 2019 at 1:58 pm #164089dragonParticipant
I am looking for a way to translate “Previous” and “Next”, which point to the previous and next post respectively, to Vietnamese. Please advise as to what is the simplest way to do this for Catch Evolution the free version.
In my site, I use a child theme which extends Catch Evolution. Many thanks.Dragon
January 21, 2019 at 7:14 pm #164108dragonParticipantI have taken the following steps:
1. Add the following file to /public_html/wp/wp-content/themes/catch-evolution/languages: vi.mo. This file contains the Vietnamese strings for the text used in the theme.
2. in /public_html/wp, add the following line to wp-config.php: define(‘WPLANG’, ‘vi’);Unfortunately, this doesn’t seem to work. Maybe I am missing some key steps, or something is not right.
I understand that I can set the site language to Vietnamese in the WP dashboard. Indeed, when I did that, the Previous and Next pointers get translated correctly. However, this option also changes the language of my site to Vietnamese including the dashboard itself. This is not what I have in mind.
I hope someone can point me to the right direction to get this done correctly. Many thanks.
Dragon
January 21, 2019 at 10:58 pm #164120SkandhaParticipant@dragon: To translate those texts, you will need to add Vietnamese language file vi_VN.po which you can get by editing the catch-evolution.pot file in languages folder.
What you need to do is download free software from http://poedit.net/ then open the software and create New Translation and select the language Vietnamese(Vietnam). Now search for words like Previous, Next and the words you want to translate and add the translation for those words and save it. You can also add other translations there as well. The words will be translated when you change your site language to Vietnamese.
You can send us the translated .po file and we will add it in our theme with you as a contributor for the translation.Let me know if this solves your issue.
Kind Regards,
SkandhaJanuary 21, 2019 at 11:50 pm #164124dragonParticipantHi Skandha,
Thanks for your reply. I did take the steps suggested in your reply, but it doesn’t seem to work.
I am using a child theme of Catch Evolution. In that case, does the vi.mo file still go to the languages directory under catch-evolution? or does it go to a directory under catch-evolution-child?Many thanks,
DragonJanuary 24, 2019 at 3:32 am #164320SkandhaParticipant@dragon: Since you are using a child theme the
vi.mo
andvi.po
files should go under the languages directory under your child theme folder.
Then you will need to
Go to => Child Theme Folder => functions.php and add the following code.add_action( 'after_setup_theme', function () { // load custom translation file for the parent theme load_theme_textdomain( 'catch-evolution', get_stylesheet_directory() . '/languages/' ); // load translation file for the child theme load_child_theme_textdomain( 'my-child-theme', get_stylesheet_directory() . '/languages' ); } );
Let me know if this works out!
Kind Regards,
Skandha -
AuthorPosts
- The topic ‘Localization of Previous and Next into Vietnamese’ is closed to new replies.