function date_t_strings in Date 6.2
Construct translation arrays from pipe-delimited strings.
Combining these strings into a single t() gives them the context needed for better translation.
1 call to date_t_strings()
- date_t in ./
date_api.module - A function to translate ambiguous short date strings.
File
- ./
date_api.module, line 679 - This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.
Code
function date_t_strings(&$replace, $langcode) {
$replace[$langcode]['day_name'] = explode('|', trim(t('!day-name Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday', array(
'!day-name' => '',
), $langcode)));
$replace[$langcode]['day_abbr'] = explode('|', trim(t('!day-abbreviation Sun|Mon|Tue|Wed|Thu|Fri|Sat', array(
'!day-abbreviation' => '',
), $langcode)));
$replace[$langcode]['day_abbr1'] = explode('|', trim(t('!day-abbreviation S|M|T|W|T|F|S', array(
'!day-abbreviation' => '',
), $langcode)));
$replace[$langcode]['day_abbr2'] = explode('|', trim(t('!day-abbreviation SU|MO|TU|WE|TH|FR|SA', array(
'!day-abbreviation' => '',
), $langcode)));
$replace[$langcode]['ampm'] = explode('|', trim(t('!ampm-abbreviation am|pm|AM|PM', array(
'!ampm-abbreviation' => '',
), $langcode)));
$replace[$langcode]['datetime'] = explode('|', trim(t('!datetime Year|Month|Day|Week|Hour|Minute|Second|All Day|All day', array(
'!datetime' => '',
), $langcode)));
$replace[$langcode]['datetime_plural'] = explode('|', trim(t('!datetime_plural Years|Months|Days|Weeks|Hours|Minutes|Seconds', array(
'!datetime_plural' => '',
), $langcode)));
$replace[$langcode]['date_order'] = explode('|', trim(t('!date_order Every|First|Second|Third|Fourth|Fifth', array(
'!date_order' => '',
), $langcode)));
$replace[$langcode]['date_order_reverse'] = explode('|', trim(t('!date_order |Last|Next to last|Third from last|Fourth from last|Fifth from last', array(
'!date_order' => '',
), $langcode)));
$replace[$langcode]['date_nav'] = explode('|', trim(t('!date_nav Prev|Next|Today', array(
'!date_nav' => '',
), $langcode)));
// These start with a pipe so the January value will be in position 1 instead of position 0.
$replace[$langcode]['month_name'] = explode('|', trim(t('!month-name |January|February|March|April|May|June|July|August|September|October|November|December', array(
'!month-name' => '',
), $langcode)));
$replace[$langcode]['month_abbr'] = explode('|', trim(t('!month-abbreviation |Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec', array(
'!month-abbreviation' => '',
), $langcode)));
}