-
AuthorPosts
-
December 18, 2014 at 7:04 am #166991
Hi,
I’ve a problem on my site. Some sentences like “Proceed to Checkout” are not translated in my language (french).
The fact is when I open the po file, I can see the translation has been fully completed. Even if I regenerate the mo file and put it online, some sentences still not translated.
The funny thing is some sentences are translated, some are not.
So could you tell me what to do to repair the sentences that are not translated ?
Thanks
December 18, 2014 at 7:50 am #167017Ok, after searching on the forum, I found a method on that page :
https://theme.co/x/member/forums/topic/woocommerce-in-german/page/2/#post-162099
the problem is that the code you provide bring an error :
Parse error: syntax error, unexpected ‘$strings’ (T_VARIABLE), expecting function (T_FUNCTION) in /homepages/12/d177191422/htdocs/wordpress-lesidaner.com/wp-content/themes/x-child-integrity-dark/functions.php on line 10
After looking on the web I find a solution : to write “public” just before what is written on line 10 :
$strings = array();So my problem seems to be solved. My question is now :
Is that okay for the site security to do so ? Because on the web, it was written : you can choose public, private or protected.December 18, 2014 at 6:45 pm #167333Hi Bejam,
Not sure why it would throw an error when it works for other users.
You don’t need to worry about variables being public. It’s just a different type of variable declaration on OOP programming. In fact, it doesn’t need to be public, private, or protected since you’re not doing subclassing, inheritance, or etc.
It will not make your data accessible on public viewing. It will only make the variable accessible by other codes within your server, and again , since there is no code needed to access them, you don’t need those definition at all.
Hope this helps.
-
AuthorPosts