Refresh Software Documentation » Helios Calendar 1.x » Localization Settings

Click here for the current version of this page.

Contents

Address Format

Helios Calendar supports two address formats:

US/CAN/AUS
Address Line 1
Address Line 2
City, Region Postal Code
Country

Europe
Address Line 1
Address Line 2
Postal Code, City
Country

 

This setting is configured by editing your language pack config.php file.

'AddressType'     =>     '1',

Set AddressType to 1 for US/Can/Aus format or 0 for Europe format.

Note: Region is equivalent to State/Province/etc and Postal Code to Zip Code/Postcode/etc. The terms above are generic for example only. Each available Language Pack is localized appropriately.

Also Note: These address formats can be edited, or additional formats added, by editing the buildAddress() function located on, or near, line 746 in the /events/includes/code.php file.

Region Field (US States List)

By default Helios Calendar's "region" field is labeled as "State" and a select list of US States is used, however, this label and select list can be customize to any value, or hidden, for your Helios Calendar install.

This setting is configured by editing your language pack config.php and selectRegion.php files.

'AddressRegion'		=>	'1',
'RegionLabel'		=>	'State:',
'RegionTitle'		=>	'State',

Set your config.php AddressRegion setting to 1 to use the Region input or 0 to hide it. RegionLabel can be changed to your region values name including a semi-colon (:) and RegionTitle changed to just the region value name.

Edit your selectRegion.php file using the following format:

<option <?php if(isset($state) && ($state=="STORED_TEXT")){echo "selected=\"selected\"";}?>
value="STORED_TEXT">DISPLAYED_TEXT</option>

For example: to create a selectRegion.php file for Canada the inputs would match:

<option <?php if(isset($state) && ($state=="AB")){echo "selected=\"selected\"";}?>
value="AB">Alberta</option>

STORED_TEXT & DISPLAYED_TEXT can be the same or (in the case of the default US State list) the stored text can be an abbreviation of the displayed select option.

Note: While the variable $state is used within the PHP code (and this variable cannot be changed), the value of the select list and inputs can be any region and is not limited to US States.

Date Localization

Helios Calendar uses the PHP functions setlocale() and strftime for the dynamic localization of dates. For these functions to work the appropriate locales must be installed on the local server and PHP must be configured to access them.

Because locale formats vary from server to server Helios uses an array of locale values to ensure that each language pack is compatible with a variety of server types.

To change the locale settings for your language pack edit the config.php file

'LocaleOptions'     =>     array('en_US', 'English', 'USA', 'United States'),

Locale Format Samples

  • Name of Country = 'United States'
  • Name of Language = 'English'
  • Abbreviation of Country = 'USA'
  • ISO language_COUNTRY Code = 'en_US'

This list includes only the recommended locale minimums (to cover a minimum of server types). Additional formats may be required depending on your server type & configuration and desired locale.

Date Formats

Once the proper locales have been configured you can edit date formats within the admin console Preferences.

For date string variables reference the PHP strftime() manual.

Time Localization

Helios Calendar supports both 12 and 24 hour time formats. You can edit time formats within the admin console Preferences.

For time string variables reference the PHP strftime() manual.

Mini-Calendar (Control Panel)

The Month/Year value of the selectlist in the Mini-Calendar will be localized by editing your language pack locale (see above for details). To localize the abbreviations for weekday names edit the MiniCalDays setting within your language pack config.php file.

'MiniCalDays'     =>     array(0 => "S", 1 => "M", 2 => "T", 3 => "W", 4 => "T", 5 => "F", 6 => "S"),

Only edit the letter in quotes to the localized value, numeric indices should remain unedited.

JavaScript Date Selection Tool

To localize the popup date selection calendar (used to enter dates in event forms) you will need to edit the popCal.js file within your language pack. This file includes names and abbreviations for months as well as an option to change which day of the week the calendar starts on. Reference the file's comments for more details.

Embedded Google Maps

You can localized the embedded Google Map in Helios by changing the Google Maps URL setting within your API Settings to use your local Google URL. Examples include:

Note: This setting must include the full Google Maps URL as well as a "trailing" slash (see examples above).

Location Maps & Weather Links

Maps & Weather link services can be customized to use any service that supports URL argument links. More information is available in the Weather & Map Links section of the documentation.

Right to Left Display

Helios Calendar offers native Right-to-Left layout support for both the admin console and public calendar. Activating it is a two step process.

After you have downloaded the Right to Left template from the Refresh Members Site:

  1. Upload the right-to-left zip file contents to your Helios install (replacing the default stylesheets).
  2. Change your language pack config.php file Direction:
'Direction'		=>	'1',

to

'Direction'		=>	'0',

Right-to-left display can be used in conjunction with translated language packs that use right-to-left text.