April 17, 2017 at 8:09 pm #6442
can i get some help with the translation of the labels?
But as stated in the manual there was no example file in the specified folder.
I created a file be_FR, and pasted the example, but i don’t understand how this should work.
‘label1’ => ‘label1_EN’,
should ‘label1’ be the fieldname? fe woo_price_calc_n?
tx for the helpApril 18, 2017 at 4:21 pm #6458
label1 is the Label of the field (Field Label), so if you create a new field with label ‘height’, label1 will be ‘height’.
label1 could be a dropdown item also. So if you create a new dropdown field, you can translate every item of the select field.
EnricoApril 19, 2017 at 5:01 pm #6457
tx! i managed to translate the labels.
But the translation of the labels in the dropdown doesn’t seem to work.
Also, on my phone (iphone) the labels are not translated.
Maybe a phone uses expects something else then fr_FR?
[hide]http://bit.ly/2oLH2Rs[/hide]April 20, 2017 at 3:27 pm #6456
It depends on what is your default language on your browser phone.
If WooPriceCalculator can’t find the string in any of your files, it tries to check if en_US.php exists. If en_US.php doesn’t exists than WPC shows the label as it is.
WPC translates based on the current language on the user browser (the same as WordPress does)
Could you post your language file so that I can understand why dropdown label translation is not working?
EnricoApril 20, 2017 at 7:56 pm #6455
attached the fr-FR.php file
concerning the translations, i use WPML for the translations
it is weird that this works correct on my pc. When i swith the language it shouldn’t it use the language defined in the page instead of the browser lang?
tx for the help!
[attachment=62]fr_FR.zip[/attachment]April 20, 2017 at 8:01 pm #6454
i noticed that the labels of the dropdowns are translated in the checkout.
just not in the form. I use a custom theme.April 24, 2017 at 7:59 am #6453
If you are using a custom theme, form templates are not managed by WPC anymore.
You can use the function:
For example in the default custom theme:
This is a template exampleview['data'] as $field): ?>
May 2, 2017 at 9:01 pm #6452
can you help a little bit more on this one? pleeease 😉
this is what i have in my theme file for a dropdown.
I don’t see where i should add you code? Above this form?view[‘data’][‘woo_price_calc_7’][‘class’]; ?>”>
Where “woo_price_calc_2” is your field.
but you can just do:
This code replace the previous one because
$field['widget'] draws automatically all the html of the field.
Tx for your help Enrico,
but i don’t see the change. See the screenshots, Everything is translated (labels, my customdescription i added in the theme)
but not the labels in the dropdown.
in the checkout it is translated.
this is my field now (noticed the html editor cleaned up to much in my previeous post):
Could you please send me your FTP and wp-admin access credentials to https://altoswebsolutions.com/contact-us?
I just sent the credentials. Sorry this took a bit longer, but i had some issues with plugin updates.
Could you please send to me WP-admin credentials also?
Just sent the credentials by mail.
I’ve solved the problem. There was mainly two problems:
1. A plugin problem, the dropdown items were not well translated
2. Language file is: “nl_NL.php”, so I created a “nl_NL.php” file and copied the contents from “be_FR.php”. You need to change the translations there.
I’ve updated your plugin to 1.2.24
- You must be logged in to reply to this topic.