Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #164089
    dragon
    Participant

    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

    #164108
    dragon
    Participant

    I 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

    #164120
    Skandha
    Participant

    @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,
    Skandha

    #164124
    dragon
    Participant

    Hi 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,
    Dragon

    #164320
    Skandha
    Participant

    @dragon: Since you are using a child theme the vi.mo and vi.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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Localization of Previous and Next into Vietnamese’ is closed to new replies.