From 33810c33ca9aad3b152ddc6d6fa9f0e0c5fde9a5 Mon Sep 17 00:00:00 2001 From: Johannes Weberhofer Date: Wed, 22 Jun 2011 15:46:33 +0200 Subject: [PATCH] Improved internationalization --- code/widgets/ArchiveWidget.php | 23 ++++++++++++++++------- lang/de_DE.php | 4 ++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/code/widgets/ArchiveWidget.php b/code/widgets/ArchiveWidget.php index dd130c7..156a694 100644 --- a/code/widgets/ArchiveWidget.php +++ b/code/widgets/ArchiveWidget.php @@ -22,11 +22,23 @@ class ArchiveWidget extends Widget { 'DisplayMode' => 'month' ); - static $title; - - static $cmsTitle; + static $title = 'Browse by Date'; - static $description; + static $cmsTitle = 'Blog Archive'; + + static $description = 'Show a list of months or years in which there are blog posts, and provide links to them.'; + + function Title() { + return i18n::_t('ArchiveWidget.BrowseByDate', ArchiveWidget::$title); + } + + function CMSTitle() { + return i18n::_t('ArchiveWidget.BlogArchive', ArchiveWidget::$cmsTitle); + } + + function Description() { + return i18n::_t('ArchiveWidget.Description', ArchiveWidget::$description); + } function getCMSFields() { $fields = parent::getCMSFields(); @@ -107,7 +119,4 @@ class ArchiveWidget extends Widget { } } -ArchiveWidget::$title = i18n::_t('ArchiveWidget.BrowseByDate', 'Browse by Date'); -ArchiveWidget::$cmsTitle = i18n::_t('ArchiveWidget.BlogArchive', 'Blog Archive'); -ArchiveWidget::$description = i18n::_t('ArchiveWidget.Description', 'Show a list of months or years in which there are blog posts, and provide links to them.'); ?> diff --git a/lang/de_DE.php b/lang/de_DE.php index c7f14b5..8fb105e 100644 --- a/lang/de_DE.php +++ b/lang/de_DE.php @@ -17,8 +17,8 @@ if(array_key_exists('de_DE', $lang) && is_array($lang['de_DE'])) { } $lang['de_DE']['ArchiveWidget']['BlogArchive'] = 'Archiv'; -$lang['de_DE']['ArchiveWidget']['BrowseByDate'] = '√úbersicht'; -$lang['de_DE']['ArchiveWidget']['Description'] = 'Zeigt eine Liste von Monaten oder Jahren, welche Blog Eintr√§ge enthalten und erstellt Links'; +$lang['de_DE']['ArchiveWidget']['BrowseByDate'] = 'Archiv'; +$lang['de_DE']['ArchiveWidget']['Description'] = 'Zeigt eine Liste von Monaten oder Jahren, welche Blog Einträge enthalten und erstellt Links'; $lang['de_DE']['ArchiveWidget']['DispBY'] = 'Anzeige nach'; $lang['de_DE']['ArchiveWidget']['MONTH'] = 'Monat'; $lang['de_DE']['ArchiveWidget']['PLURALNAME'] = 'Archiv-Widgets';