dfcalendar language

A place for users and developers of the Xataface to discuss and receive support.

dfcalendar language

Postby 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
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Re: dfcalendar language

Postby 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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: dfcalendar language

Postby 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
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Re: dfcalendar language

Postby 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
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Re: dfcalendar language

Postby 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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: dfcalendar language

Postby 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
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 16 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved