New Landing How can we help? Themeforest Theme Support Neighborhood .mo and .po files in a child theme

Viewing 15 posts - 1 through 15 (of 31 total)
  • #112753
    librairiesel
    Member
    Post count: 45

    Hi,

    How can I set the .mo and .po files (in french for instance) in the child theme?
    Because everytime there is an upgrade of the theme, I have to re-upload my .po and .mo files, and it’s quite annoying :/

    By the way, can I do the same thing with the language files of the woocommerce plugin (I mean in the child theme)?

    Also, I have a problem with a traduction somewhere in the site.
    For instance : http://librairie-sel.com/panier/
    The site is in french, so you should read “Votre panier est vide” instead of “Your shopping bag is empty”. I did verify this sentence in the .po file and the traduction is correct, but on the site you can see “Your shopping gag is empty” (it’s not bag but gag I precise).

    The phrase below is in the same case, and when there is an article in the shopping bag, the “update shopping bag” link isn’t traduced either (and I looked in the .po file and it IS traduced).
    There’s also other kinds of issues somewhere else, but I won’t tell you all of them because they maybe come from the same problem.

    Thank you

    #112765
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please create a β€œlanguages” folder in the child theme, where you need to upload the po and mo files. After that create a functions.php file in the child theme and added this code:

    <?php
    function neighborhood_child_setup() {
    load_child_theme_textdomain( 'swiftframework', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'neighborhood_child_setup' );
    ?>

    Hope that should help to you.
    Thanks πŸ™‚
    With Best Regards
    Mohammad

    #112781
    librairiesel
    Member
    Post count: 45

    Hi,

    Thank you, this is great!
    Now, I would like to apply this to the woocommerce plugin, is it possible?
    And I also have the issues I told you with the translation errors (excuse me, I said “traduction” instead of “translation”, it’s the french word).

    #112918
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You dont need woocommerce translation because theme overrides woocommerce template files and translation. I am not getting your translation issue so please explain with marked screenshot.

    Thanks πŸ™‚
    With Best Regards
    Mohammad

    #112975
    karel
    Member
    Post count: 5

    What helped me with the same issue

    I deleted all the foreign language files that I do not use from ALL the Language folders:

    wp-content / languages
    wp-content / languages / themes

    then also:
    wp-content / themes / neighborhood / languages

    after that I created Languages folder to my child theme and uploaded my translated .mo and .po files there

    then I added function.php like mentioned here above and my site is translated like I wished!

    #112980
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Thanks @karel to sharing this information.
    Thanks πŸ™‚
    With Best Regards
    Mohammad

    #112984
    librairiesel
    Member
    Post count: 45

    Hi,

    Thanks @karel, but it already worked for me with the code of Mohammad πŸ™‚

    To @Mohammad :
    Here’s the link of the page http://librairie-sel.com/panier/

    I’ve put three screenshots for you to see the translation errors (I precise again that all of these expressions are translated in the .po file)

    Attachments:
    You must be logged in to view attached files.
    #112992
    karel
    Member
    Post count: 5

    what is the still existing problem is, that SOME PART of the Woocommerce translation is somehow overridden by theme language files or something else – please see attached picture

    red color marks some random pharses which are not translated by woocommerce like others

    i tried to remove all woocommerce related pharses from language file and disabled functions.php, but it did not helped with this

    normal situation would be, that woocommerce would translate ALL pharses to choosen language – which is not happening now

    Attachments:
    You must be logged in to view attached files.
    #113304
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please edit untranslated string again in .po file. Now you will have new .po and .mo files so upload these files at your website again. Because some times .mo file is not updated.
    Thanks

    #113499
    westcoastsurf
    Member
    Post count: 210

    Thank you, this thread solved my problem about .mo files in child theme.

    #113523
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    @westcoastsurf – I am glad that your issue resolved.
    Thanks πŸ™‚
    With Best Regards
    Mohammad

    #113594
    librairiesel
    Member
    Post count: 45

    Hi,

    Still not solved for me πŸ™

    #113602
    Mohammad – SUPPORT
    Moderator
    Post count: 27441
    This reply has been marked as private.
    #113839
    librairiesel
    Member
    Post count: 45

    I’ve looked at this documentation, but I’ve done everything it says.
    Is there a way to give you my translation in french (it’s not complete at all and it doesn’t translate more than the front-office) so that it’s included in the next release ?

    Because I still can’t understand what is wrong with my site, and it would surely be helpful for other french.

    #114012
    Mohammad – SUPPORT
    Moderator
    Post count: 27441
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 31 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register