Does Internationalization break some widgets?
Archived from the Xataface Users forum.
jonbfl — Thu Sep 08, 2011 12:59 pm
Yesterday, I extended my experiment with multi-lingual content.
In my test application, I added field labels to my second language using additions to the .ini files for both languages where needed. I noted one outcome that I had ‘thought about’ earlier - What to do about checkbox widgets supported by a vocabulary list that occur in fields.ini??? Well, my multi-select widget was gone. I wasn’t surprised that happened actually. But I was surprised that the other Select widgets with supporting vocabulary broke as well. Maybe I should have foreseen that as well.
In my case the three remaining entries in fields.ini are all vocabulary supported.
- Code: Select all
[author_profession] widget:type = checkbox vocabulary = Profession repeat=1 [author_birth_month] widget:type = select vocabulary = Months [author_birth_day_of_month] widget:type = select vocabulary = Days
Can I still use a construct like this??? Is there a syntax for getting it into the language .ini files, or do I need something else???
thanks
shannah — Thu Sep 08, 2011 1:19 pm
You’ll need to define your vocabularies with the __sql__ directive. Then use standard naming conventions to translate the tables from which the vocabulary is drawn.
Either that or define then in the delegate class (but using __sql__ works fine).
-Steve
jonbfl — Mon Sep 12, 2011 5:27 am
Thanks Steve
I kinda figured that was the answer(s), but its always best to check with the ‘chef’ when in doubt on a ‘recipe’.