[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - Adding multilanguage support to calendar script?
Page 1 of 1

Adding multilanguage support to calendar script?

PostPosted: Mon Jan 29, 2007 1:30 pm
by ess_zbyszek

PostPosted: Wed Feb 07, 2007 12:34 am
by Batalf

Language

PostPosted: Wed Feb 07, 2007 10:51 pm
by espenjo
It do look like the
<script>
language code='no'
</script>
methode is working. It may be (read:is) bad programming, but this is works for me;

<%
if session("languageCode")="no" then
%>
<script type="text/javascript" src="dhtmlgoodies-calendar_no.js"></script>
<% else %>
<script type="text/javascript" src="dhtmlgoodies-calendar_en.js"></script>
<% end if %>

If anyone have a better solution, please let me know.

Are there any solution with the weeknumber model (europeen/american) in the old calendar function ?

PostPosted: Mon Feb 19, 2007 4:23 pm
by espenjo
My previous attempt for a solution may not be the best, try this instead;
- Remove the "var languageCode = 'en';" line from dhtmlgoodies-calendar.js
- Create a session varibale (if you are using ASP) with the language code and add this code;
<script type="text/javascript">
var languageCode = '<%=session("languageCode")%>';
</script>
<script type="text/javascript" src="dhtmlgoodies-calendar.js"></script>