Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › .po .mo child theme
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › .po .mo child theme
- This topic has 30 replies, 4 voices, and was last updated 10 years by Mohammad – SUPPORT.
-
Posted in: Neighborhood
-
March 22, 2014 at 2:03 pm #59875
HI,
What error have you got after using this statement ?With Best Regards
Swift IdeasMarch 22, 2014 at 4:05 pm #59886This reply has been marked as private.March 24, 2014 at 7:43 pm #60453Hi @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
April 19, 2014 at 6:42 pm #68540I 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.
April 23, 2014 at 12:22 pm #69396@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
April 23, 2014 at 6:24 pm #69490I 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/9105689I 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/9105665I apologize if this problem is due to my utter ignorance of php. Thank you very much for helping me with it.
April 24, 2014 at 11:13 am #69652That 2nd one should work fine. The first would cause issues as it’s redeclaring functions.
– Ed
April 24, 2014 at 2:57 pm #69750I 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!
April 24, 2014 at 3:37 pm #69765Sorry 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.
April 24, 2014 at 4:12 pm #69786Hm.. 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/7365/link-to-a-po-file-in-a-child-theme
– Ed
April 24, 2014 at 4:26 pm #69793Oh 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.)
April 28, 2014 at 11:52 pm #70574Will keep an eye out for a solution, sorry I couldn’t be of more help!
– Ed
April 29, 2014 at 4:28 am #70593That’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! ๐ ๐ ๐
April 29, 2014 at 3:57 pm #70841Hi,
I hope that you will get any solution sure .
Thanks ๐
With Best Regards
Swift IdeasAugust 26, 2014 at 1:29 am #103983Was 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.
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.