Viewing 15 posts - 16 through 30 (of 31 total)
  • #59875
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    HI,
    What error have you got after using this statement ?

    With Best Regards
    Swift Ideas

    #59886
    creatorofstuff
    Member
    Post count: 313
    This reply has been marked as private.
    #60453
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @creatorofstuff,

    That code isn’t related, can you check what you have in the child theme functions.php file?

    The code for the child theme language file loading should be:

    load_theme_textdomain('swiftframework', get_stylesheet_directory_uri() .'/language');

    Then place your files in /language/ within the child theme.

    – Ed

    #68540
    creatorofstuff
    Member
    Post count: 313

    I was waiting for the next theme update to work on this problem (since I had already edited the en_US.po file for Neighborhood, so I would not be able to see whether the child language files were being used or not) but it remains the same. I still get the above error message if I put a functions.php file in the child theme with that code. If I remove the functions.php file, the error code goes away but language folder in the child theme is ignored.

    Any other thoughts on this? Thanks.

    #69396
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    @creatorofstuff – can you paste the contents of your child theme functions.php here – http://pastie.org and then post the link so that I can check?

    Thanks,

    – Ed

    #69490
    creatorofstuff
    Member
    Post count: 313

    I used the functions.php file from the theme. Here is the section of code that was in the functions.php in the child theme:
    http://pastie.org/9105689

    I realized that I probably did a dumb thing by copying the entire functions.php file from the theme and then adding that line of code, so I redid it with only that line of code, but I still get an error message.

    This is how the entire second functions.php reads. Clearly that is wrong, too.
    http://pastie.org/9105665

    I apologize if this problem is due to my utter ignorance of php. Thank you very much for helping me with it.

    #69652
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    That 2nd one should work fine. The first would cause issues as it’s redeclaring functions.

    – Ed

    #69750
    creatorofstuff
    Member
    Post count: 313

    I tried the second one again, this time with no error message, but it still doesn’t use the new language file. Is there something more I need to do? There is a folder in my child theme called “language”, and it contains the en_US.mo and en_US.po files. (I know those files are good because those are the ones I was originally putting into the actual theme language folder after every update. But I’m trying to put them in the child theme so I don’t have to keep doing that.)

    Confused!

    #69765
    creatorofstuff
    Member
    Post count: 313

    Sorry to post again, but I had to remove that functions.php file from the child theme because I was unable to update social media urls without getting error messages. (Not that it was working anyway, since it had no effect on seeing the language files.)

    Warning: Cannot modify header information – headers already sent by (output started at /home2/…/public_html/wp-content/themes/neighborhood-child/functions.php:7) in /home2/…/public_html/wp-content/plugins/yith-woocommerce-wishlist/functions.yith-wcwl.php on line 118

    Warning: Cannot modify header information – headers already sent by (output started at /home2/…/public_html/wp-content/themes/neighborhood-child/functions.php:7) in /home2/…/public_html/wp-includes/pluggable.php on line 1121

    I think I’m destined to have to replace the language files every time you update the theme unless there is a good way to do it without messing up something else.

    This is sort of frustrating. Thanks for your time.

    #69786
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hm.. I’ve looked into it a little further and I’m not sure if it’s possible as standard.. Check out these and see if they work for you?

    http://wordpress.stackexchange.com/questions/113391/do-child-themes-automatically-load-the-translation-from-the-parent-theme

    http://wordpress.stackexchange.com/questions/7365/link-to-a-po-file-in-a-child-theme

    – Ed

    #69793
    creatorofstuff
    Member
    Post count: 313

    Oh wow, I read through these, and they are admittedly above my head. The second link had some possibilities but I don’t feel competent to implement them. I think I will just upload the language translation files I have edited as a part of my update process for now, unless I can miraculously figure it out.

    I really appreciate you taking the time to check it out. I’m surprised that nobody else has been bothered by the interchangeable use of “shopping cart” and “shopping bag” because of the conflict between the theme and WooCommerce. (I would prefer the use of “bag” like the theme, but changing “cart” to “bag” in WooCommerce seems even more daunting than just editing the language files.)

    #70574
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Will keep an eye out for a solution, sorry I couldn’t be of more help!

    – Ed

    #70593
    creatorofstuff
    Member
    Post count: 313

    That’s ok. I truly appreciate the great support you offer. Maybe one of these days a solution will make itself known. At least it’s not a huge deal.

    Keep up the great work! ๐Ÿ™‚ ๐Ÿ™‚ ๐Ÿ™‚

    #70841
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I hope that you will get any solution sure .
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #103983
    Sean
    Member
    Post count: 116

    Was there ever a resolution to this? I changed the terms “bag” to “cart” and every new update overwrites the files because they only work in the main theme, not the child theme.

Viewing 15 posts - 16 through 30 (of 31 total)

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

License required for the following item
Login and Registration Log in · Register