dfcalendar language
Archived from the Xataface Users forum.
Jean — Wed Jun 15, 2011 5:38 am
Hi Steve and all,
How can I change the widget:type = calendar language ? I have searched this topic without finding anything .
Jean
shannah — Wed Jun 15, 2011 9:16 am
I believe you can set it with:
- Code: Select all
widget:lang=fr
for example.
But thanks for raising this. This is a bug as it should default to the current language. I have made this change in SVN. Here is the diff to fix this issue:
- Code: Select all
-
`Index: Dataface/FormTool/calendar.php
— Dataface/FormTool/calendar.php (revision 2370)
+++ Dataface/FormTool/calendar.php (revision 2371)
@@ -11,6 +11,9 @@
*/
$widget =& $field[‘widget’];
+ if ( !@$widget[‘lang’] ){
+ $widget[‘lang’] = Dataface_Application::getInstance()->_conf[‘lang’];
+ }
$factory =& Dataface_FormTool::factory();
$el =& $factory->addElement(‘calendar’, $formFieldName, $widget[‘label’]);
$el->setProperties($widget);`
Best regards
Steve
Jean — Thu Jun 16, 2011 6:47 am
thank you Steve for your reactivity as usual, I got the file.
- Code: Select all
widget:timeFormat
worked but not
- Code: Select all
widget:lang=fr
.
Jean
Jean — Wed Aug 17, 2011 6:31 am
Hello Steve,
I tried to add the lines on the last version (xataface-1.3rc6) but it still does not work. The calendar widget is still in English.
- Code: Select all
if ( !@$widget['lang'] ){ $widget['lang'] = Dataface_Application::getInstance()->_conf['lang']; }
Thank you for your help
Jean
shannah — Wed Aug 17, 2011 11:49 am
Try pulling the version from the trunk http://weblite.ca/svn/dataface/core/tru … lendar.php It should work.
-Steve
Jean — Thu Aug 18, 2011 1:03 am
thank you Steve, it works.
Besides I had to encode the langage file ( lib/jscalendar/lang…)in UTF-8.
Jean