How to translate dates in CMSMS? News, Calendar etc.

Have a translation or something? It goes here. This can mean modules, documentation, or CMSMS itself!
Post Reply
mjrumble
Forum Members
Forum Members
Posts: 19
Joined: Tue Sep 15, 2009 7:59 pm

How to translate dates in CMSMS? News, Calendar etc.

Post by mjrumble »

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.
mjrumble
Forum Members
Forum Members
Posts: 19
Joined: Tue Sep 15, 2009 7:59 pm

Re: How to translate dates in CMSMS? News, Calendar etc.

Post by mjrumble »

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
owr_bgld

Re: How to translate dates in CMSMS? News, Calendar etc.

Post by owr_bgld »

So on the fly - maybe with an udt

first make an UDT

Code: Select all

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

Code: Select all

{$month_names[$month]}

{Name_of_UDT month="$month_names[$month]"}
Hypocrite
Forum Members
Forum Members
Posts: 48
Joined: Wed Aug 26, 2009 6:25 am

Re: How to translate dates in CMSMS? News, Calendar etc.

Post by Hypocrite »

How does this work for the search form template?

It has this code to generate the dropdown lists:

Code: Select all

{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.
Post Reply

Return to “Translations”