8 years ago
6
Topic

Hi, i would like to know if there's a way to translate automatically date with the calendar plugin in french, deutschland, or whatever with seblod or if it's necessary to modify the calendar plugin ?

Thanks in avance for your answers

Get a VIP membership
8 years ago
0
Level 1

Hi, i made just a little modification in the calendar plugin, that i found to be useful to automatically translate =>

i just added these lines in the onCCK_FieldPrepareSearch function, line 181 =>

	
$pattern = "/([[:alpha:]]+)/i"; 
	                        $value = preg_replace_callback($pattern,function($matches){
                                return JText::_($matches[1]);
                        },$value);
4229 Posts
Kadministrator
8 years ago
4
Level 1

If you enabled multilanguage in Joomla calendar plugin should be translated automatically without any modifications

8 years ago
3
Level 2

Hi Klas

NO sorry, on http://www.dbu.univ-paris3.fr/fr/formations/doctorants-informations-et-inscriptions we had to apply the modification we wrote above unless the date in the form is not translated.

Please notice the problem ONLY occurs on the loading of the search form BEFORE you click on the calendar itself if you put (for example) TODAY as a live value (button 2) on the date field. 

Once you pick a date on the calendar, the date is correctly translated in the field.

On http://www.dbu.univ-paris3.fr/fr/formations/doctorants-informations-et-inscriptions you no longer see the error since we applied the fix we wrote before.


thanks


cyril

4229 Posts
Kadministrator
8 years ago
2
Level 3

Ok, this is more clear, I can confirm this problem, please create an issue on github.

8 years ago
1
Level 4

Thanks Klas, new issue submitted to https://github.com/Octopoos/SEBLOD/issues/162



thanks

cyril


4229 Posts
Kadministrator
8 years ago
0
Level 5

I created a pull to fix this, see github issue linked above.

Get a Book for SEBLOD