function _calendar_systems_add_strings in Calendar Systems 7.2
Same name and namespace in other branches
- 8 calendar_systems.admin.inc \_calendar_systems_add_strings()
- 7 calendar_systems.admin.inc \_calendar_systems_add_strings()
1 call to _calendar_systems_add_strings()
- calendar_systems_profile_overview in ./
calendar_systems.admin.inc - Form callback for calendar systems profiles.
File
- ./
calendar_systems.admin.inc, line 199 - Contains Calendar Systems administration form callbacks.
Code
function _calendar_systems_add_strings() {
_calendar_systems_load_dependencies();
$calendar = cmfcCalendar::factory('v1', array());
$stringGroups = $calendar
->getAllStrings();
foreach ($stringGroups as $stringGroupName => $stringGroup) {
foreach ($stringGroup as $langcode => $strings) {
foreach ($strings as $string) {
$options = array(
'langcode' => $langcode,
);
if ($stringGroupName == 'monthsName') {
$options['context'] = 'Long month name';
}
if ($stringGroupName == 'weeksShortName') {
$options['context'] = 'Week short name';
}
$val = t($string, array(), $options);
}
}
}
}