CMS Made Simple Forums
https://forum.cmsmadesimple.org/

How to translate dates in CMSMS? News, Calendar etc.
https://forum.cmsmadesimple.org/viewtopic.php?f=15&t=47114
Page 1 of 1

Author:  mjrumble [ Mon Sep 06, 2010 9:28 pm ]
Post subject:  How to translate dates in CMSMS? News, Calendar etc.

Hi, Does anybody know how to go about changing the date lang in cmsms. I am trying to do it under CGCalendar I have made a translation for everything but the months will not change. I have made searches through the whole files in my site but only a java script shows the months. Changing these does not change anything. Anybody got any ideas? Does it come from the server?

The same goes for news. Has anybody had luck with this?

Thanks in advance.

Author:  owr_bgld [ Tue Sep 07, 2010 1:24 pm ]
Post subject:  Re: How to translate dates in CMSMS? News, Calendar etc.

http://forum.cmsmadesimple.org/index.ph ... 126.0.html
http://forum.cmsmadesimple.org/index.ph ... 338.0.html
http://forum.cmsmadesimple.org/index.ph ... 149.0.html

maybe thers's something for you

Author:  mjrumble [ Tue Sep 07, 2010 7:54 pm ]
Post subject:  Re: How to translate dates in CMSMS? News, Calendar etc.

Thanks for the reply,

I should have said I want to change the lang to Welsh which as far I know not supported but a server. I have made Welsh a new lang in cmsms and happy with changing date format but i want to define my own name for the days and months. Any ideas?

thanks

Author:  owr_bgld [ Tue Sep 07, 2010 9:15 pm ]
Post subject:  Re: How to translate dates in CMSMS? News, Calendar etc.

So on the fly - maybe with an udt

first make an UDT

\$1:
if ($month == "January" || $month =="01") {$welshmonth = "welshmonthnameJan";}
elseif ($month == "February" || $month =="02") {$welshmonth = "welshmonthnameFeb";}
........
elseif ($month == "December" || $month =="12") {$welshmonth = "welshmonthnameDec";}
echo $welshmonth;


you have to change the template with the right Names of themonths

second: you can put an UDT to the template (example from CGCalendar-Template)
instead of
\$1:
{$month_names[$month]}

{Name_of_UDT month="$month_names[$month]"}

Author:  Hypocrite [ Fri Dec 03, 2010 3:55 pm ]
Post subject:  Re: How to translate dates in CMSMS? News, Calendar etc.

How does this work for the search form template?

It has this code to generate the dropdown lists:
\$1:
{capture assign='tmp'}{$actionid}cal_search_end_date_{/capture}
{html_select_date prefix=$tmp time=$search_end_date start_year=-1 end_year=+2}
{* {html_select_time prefix=$tmp time=$search_end_date display_seconds=0} *}


And they all in English even though I have translated them.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/