Translation problem of "Price" on single product

May 2014 WordPress Theme
GK User
Wed Mar 25, 2015 11:12 am
Hi,
everything works great and translations are good except the word "Price" which won't translate on a single product page. It's translated in WooCommerce and the theme but is it set from somewhere else?
User avatar
Senior Boarder

GK User
Thu Mar 26, 2015 8:42 am
Hello,

The "Price" text should be added to theme langauge file, did you translate the theme?
I can see this word in StoreFront.pot file:
Code: Select all
#: woocommerce/single-product/price.php:16
msgid   "Price: "
msgstr  ""
User avatar
Moderator

GK User
Tue Apr 07, 2015 12:46 pm
Yes,
it's translated in the StoreFront language file.

#: woocommerce/single-product/price.php:16
#@ StoreFront
msgid "<span class=\"price-text\">Price: "
msgstr "<span class=\"price-text\">Pris: "
User avatar
Senior Boarder

GK User
Tue Apr 07, 2015 1:48 pm
Hi,

In this case, could you send me a PM with backend and FTP access to your website? Then I'll be able to check it.
User avatar
Moderator

GK User
Tue Apr 07, 2015 10:25 pm
Hi,

In your sv_SE.po file, there's only one phrase from price.php file, in the language file (StoreFront.pot) you can find this file twice, please translate also this text:

Code: Select all
#: woocommerce/single-product/price.php:16
msgid   "Price: "
msgstr  ""
User avatar
Moderator

GK User
Thu Apr 09, 2015 11:34 am
Hi,
sorry but I can only find it ones in the StoreFront.pot and it only appears as one string in Poedit and Localization. Should I add it a second time in the StorFront.pot?
User avatar
Senior Boarder

GK User
Thu Apr 09, 2015 8:37 pm
Hi,
Are you sure that you are using StoreFront.pot file from the latest version of the StoreFront theme?
In line 683 you should have this fragment:
Code: Select all
#: woocommerce/single-product/price.php:16
msgid   "Price: "
msgstr  ""
User avatar
Moderator

GK User
Fri Apr 10, 2015 11:19 am
Yes, I do have that content in line 683. And it looks as you wrote, but do I need to do anything with that line in the StoreFront.pot file?
User avatar
Senior Boarder

GK User
Fri Apr 10, 2015 11:27 am
Not with the StoreFront.pot, but when you are using i.e. PoEdit, please translate this word "Price:"
and in your *.po file you should then have this content:

Code: Select all
#: woocommerce/single-product/price.php:16
msgid "Price: "
msgstr "Price in your langauge: "


that's all, you can also change this text directly in soocommerce/single-product/price.php file.
User avatar
Moderator

GK User
Fri Apr 17, 2015 2:00 pm
Ok, thanks. Had to change it within the price.php file, strange.
User avatar
Senior Boarder


cron