• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Solution for dynamic multilingual calendar field

Solution for dynamic multilingual calendar field 12 years 6 months ago #15095

  • bbaa123
  • bbaa123's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi all!
This is my solution for using dynamic multilingual calendar field on multilingual sites.
First go to FAQ section for RSForm! Documentation and read article "Changing the date format".
Direct link to article
It gives you a way how to translate calendar field.
Then locate calendar.js in your joomalaroot/components/com_forme/calendar/calendar.js
Rename it to calendar-en.js. Copy it and rename to calendar-**.js (where ** is the language ISO tag)

Example:

If your site is dual-lingual - English and Bulgarian you must have to JS files as follow:
calendar-en.js
calendar-bg.js
(if you have another language at front end - German - make another copy as calendar-de.js - there must be 3 files then)


After that edit each JS file as implemented in FAQ section and translate needed strings.

Locate in joomalaroot/components/com_forme/calendar file initcal.php. Open it.
Delete everything bellow:

defined( '_JEXEC' ) or die( 'Restricted access' );

and paste this code there:

$language =& JFactory::getLanguage();
$calendar_lng = '';
$calendar_lng = substr($language->getTag(),0,2);

$html .= '
<script type="text/javascript" src="'.JURI :: base().'/components/com_forme/calendar/yahoo.js"></script>
<script type="text/javascript" src="'.JURI :: base().'/components/com_forme/calendar/event.js" ></script>
<script type="text/javascript" src="'.JURI :: base().'/components/com_forme/calendar/dom.js" ></script>
<script type="text/javascript" src="'.JURI :: base().'/components/com_forme/calendar/calendar-'. $calendar_lng .'.js"></script>
<link type="text/css" rel="stylesheet" href="'.JURI :: base().'/components/com_forme/calendar/calendar.css">

<script language="javascript">
YAHOO.namespace("example.calendar");
</script>
';
?>

Save the file.
:evil: This is!

Now calendar field will be in current language as joomla language selected!
*REMARK
This worked on joomla 1.5.xx, I tested it on joomla 1.5.23 with joomfish enabled!
I hope this be a useful to you!
Have a greet times!
Last Edit: 12 years 6 months ago by bbaa123.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!