Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #139670

    Oliver V
    Participant

    Hi!

    I am editing the theme´s language included in wp-content/themes/x/framework/lang.

    In order to keep safe all the changes when new update is here, should I add the new .mo and .po files wihin the following child directory: wp-content/themes/x-child-integrity-dark/framework/lang ????

    Let me know how to do this. I am editing your .po file with poedit program.

    Thanks!

    #139674

    Oliver V
    Participant

    And one more thing…. How should I do it with the woocommerce plugin? What do I need to create in my X Child Theme?

    #139681

    Oliver V
    Participant

    Hi!

    Just changed some words within your x theme default.po file, uploaded again in wp-content/themes/x/framework/lang with the same name and nothing happens. Please, help….

    Thanks!

    #139811

    Cousett
    Member

    Our KB article on translation can help you get started with your needs – https://theme.co/x/member/kb/translation/

    #144907

    Oliver V
    Participant

    Hi!

    I have read all the links you mentioned.

    What I don´t have clear is the following: In order to keep my translation changes when an X theme update release, should I set up in my child theme directory //framework/lang my es_ES po file? Or due that is different that your default.po file, just write my file in the x main directory //x/framework/lang?

    Sorry for asking, but I don´t want to waste time.

    Thanks again!

    Oliver.

    #145316

    Cousett
    Member

    All changes should happen in the child theme file to ensure that they don’t get overwritten during a theme update.

    #145334

    Oliver V
    Participant

    With the name default.po or es_ES.po? (Of course in my child route directory).

    #145645

    Christopher
    Moderator

    Hi there,

    You should copy all MO and Po files in your theme and put them in the same path as your parent theme.
    Thank you.

    #145750

    Oliver V
    Participant

    Ok. Thanks!!

    #146062

    Oliver V
    Participant

    Sorry… Still not working….

    I have copied from /html/wp-content/themes/x/framework/lang the file default.po

    Then, make changes in the translation and save translated file together with .mo file into /html/wp-content/themes/x-child-integrity-dark/framework/lang. Name of the files are the same: default.po and default.mo.

    But still can not see the translation for example in the Comments tab…. Any ideas?

    Thanks!

    Oliver.

    #146079

    eme
    Participant

    I have the same problem using the “x-child-renew”.

    After uploading the es_ES.po and .mo files, update the wp-config.php (adding the “define (‘WPLANG’, ‘es_ES’);” line) and also add this line “load_theme_textdomain( ‘framework’, TEMPLATEPATH.’/lang’ );” to the functions.php archive in the child theme, the translations doesn’t work.

    I’ve tried uploading the .po .mo files with both names “es_ES” and “default” and none of them works.

    I’ve used po edit and loco translate… but there was no difference in the results.

    thanks!

    #146093

    Oliver V
    Participant

    Just realised too….

    On hover the social shortcode, no translations are there…. Everyhting always in English….

    Looking forward to hearing from you!

    Thanks

    #146098

    Oliver V
    Participant

    Hi!
    Following EME comments, I do have as well change wp-config.pho the “define (‘WPLANG’, ‘es_ES’); line.

    But I don´t have added the line load_theme_textdomain( ‘framework’, TEMPLATEPATH.’/lang’ ); in my function.php child file. I just tried it as well, but not results….

    In my case I am not changing the default.po name.

    Thanks!

    #146225

    Rad
    Moderator

    Hi guys,

    Please try this one on your child theme’s functions.php

    add_action( 'after_setup_theme', 'my_child_theme_setup' );
    function my_child_theme_setup() {
        load_child_theme_textdomain( '__x__', get_stylesheet_directory() . '/framework/lang' );
    }

    Please check this http://codex.wordpress.org/I18n_for_WordPress_Developers

    Best way is using 3rd party plugin like WPML in case you don’t want to do it manually. The plugins will pickup the strings loaded from your language files and its not gonna translate itself 🙂

    Cheers!

    #146266

    eme
    Participant

    It seems to work! Thank you so much.