- Posts: 101
- Thank you received: 12
(solved) Translate (user) Custom Text Value
13 years 4 months ago - 13 years 4 months ago #103398
by SG
(solved) Translate (user) Custom Text Value was created by SG
Hi,
I added a custom text field for the table USER to show some text under the VAT-box.
I want to punt something like: (in case you don’t have a VAT n°, please indicate **)
This should appear under the VAT-box.
I initially didn't fill in the name of the label because I DON'T want to display the label, just the value of it, because the value is aligned under the vat-box (see picture)
The problem is now how to translate this value.
I have no problems translating the other TYPES of custom fields like TEXT, TEXTAREA, RADIOBUTTONS with Falang.
Just this CUSTOMTEXT field doesn't want to be translated.
(Even when I use a the label, the label get's translated but not the value)
I also tried to put a value like #VATMSG# and then NOT use Falang but the translation override in Hikashop configuration.
Thanks!!!
PS: If there is a way to show the Label under the VAT-box than that would solve the problem too and I won't need to translate the value just the label. But labels are TD class=key and I'm not sure how to make it appear under the VAT-box
I added a custom text field for the table USER to show some text under the VAT-box.
I want to punt something like: (in case you don’t have a VAT n°, please indicate **)
This should appear under the VAT-box.
I initially didn't fill in the name of the label because I DON'T want to display the label, just the value of it, because the value is aligned under the vat-box (see picture)
The problem is now how to translate this value.
I have no problems translating the other TYPES of custom fields like TEXT, TEXTAREA, RADIOBUTTONS with Falang.
Just this CUSTOMTEXT field doesn't want to be translated.
(Even when I use a the label, the label get's translated but not the value)
I also tried to put a value like #VATMSG# and then NOT use Falang but the translation override in Hikashop configuration.
Thanks!!!
PS: If there is a way to show the Label under the VAT-box than that would solve the problem too and I won't need to translate the value just the label. But labels are TD class=key and I'm not sure how to make it appear under the VAT-box
Last edit: 13 years 4 months ago by SG.
Please Log in or Create an account to join the conversation.
13 years 4 months ago - 13 years 4 months ago #103435
by nicolas
Replied by nicolas on topic Translate (user) Custom Text Value
Hi,
The custom text type custom fields do not handle translations.
Actually you're the first one who asked for it.
Edit the file administrator/components/com_hikashop/classes/field.php and change the line:
to:
and the if you enter a translation key like MY_TEXT in the value of the custom field, you can then translate it in each translation file override with such line:
MY_TEXT=" the text I want to add"
www.hikashop.com/en/download/languages.html#modify
The custom text type custom fields do not handle translations.
Actually you're the first one who asked for it.
Edit the file administrator/components/com_hikashop/classes/field.php and change the line:
Code:
return @$field->field_options['customtext'];
Code:
return $this->trans(@$field->field_options['customtext']);
and the if you enter a translation key like MY_TEXT in the value of the custom field, you can then translate it in each translation file override with such line:
MY_TEXT=" the text I want to add"
www.hikashop.com/en/download/languages.html#modify
Last edit: 13 years 4 months ago by nicolas.
The following user(s) said Thank You: SG
Please Log in or Create an account to join the conversation.
12 years 9 months ago - 12 years 9 months ago #136821
by adambako
Replied by adambako on topic Translate (user) Custom Text Value
hi nicolas.. i need to transalte custom field too, but cant find that line of code..
its still there??
thanks
update
ok i got it.. its working
its still there??
thanks
update
ok i got it.. its working
Last edit: 12 years 9 months ago by adambako.
Please Log in or Create an account to join the conversation.
Time to create page: 0.197 seconds