-
AuthorPosts
-
November 24, 2013 at 11:58 am #192502
hi
very nice component but i have one problem how can i translate k2 extra fields?
thanksThanh Nguyen Viet Friend
Thanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
azurdo Friend
azurdo
- Join date:
- May 2013
- Posts:
- 63
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 11
- Thanked:
- 2 times in 1 posts
December 16, 2013 at 9:00 am #515536Hi
I had the same problem and i solved it using language files. I declared the name of each extrafield and the value (if you use select boxes or radio button) in language files and when i want to display it translated i modified the template for k2 to representate the extra field translated using JText function.
EJ: If you need an extra field to say the kind of fruit you can declare the extra field like:
FRUIT: APPLE | LEMONYou can define this traslations in files
EN.ini
FRUIT = Fruit
APPLE = Apple
LEMON= Lemon
ES.ini
FRUIT = Fruta
APPLE= Manzana
LEMON = Limón
And you can modify the template of k2 to display this extrafield translated
ej: JText::_( ‘FRUIT’ );I hope it will be useful
Thnks!
AJThanh Nguyen Viet Friend
Thanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
December 16, 2013 at 9:11 am #515542Hello azurdo,
It’s a nice tip 🙂
It can help to resolve this issue although it is not a standard way and has bit inconvenience 😉
Anyway, thank you for your suggestion. It will be an useful tip for many user and much appreciated 🙂
December 9, 2015 at 12:40 pm #784176i dont understand your way, pls help azurdo 🙂
Ninja Lead
Moderator
Ninja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
-
AuthorPosts
This topic contains 6 replies, has 5 voices, and was last updated by
Ninja Lead 9 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum