Merge pull request #40 from pixeltricks/master

Translations added
This commit is contained in:
Ingo Schommer 2012-08-13 01:01:28 -07:00
commit d837220b01
5 changed files with 54 additions and 2 deletions

View File

@ -124,7 +124,7 @@ class TranslatableCMSMainExtension extends Extension {
if(Permission::checkMember($member, 'VIEW_LANGS')) {
$field = new LanguageDropdownField(
'Locale',
_t('CMSMAIN.LanguageDropdownLabel', 'Language'),
_t('CMSMain.LANGUAGEDROPDOWNLABEL', 'Language'),
array(),
'SiteTree',
'Locale-English',

View File

@ -333,7 +333,7 @@ class Translatable extends DataExtension implements PermissionProvider {
* @param string $having A filter to be inserted into the HAVING clause.
* @return mixed The objects matching the conditions.
*/
static function get_by_locale($class, $locale, $filter = '', $sort = '', $join = "", $limit = "", $containerClass = "DataObjectSet", $having = "") {
static function get_by_locale($class, $locale, $filter = '', $sort = '', $join = "", $limit = "", $containerClass = "DataList", $having = "") {
if($locale && !i18n::validate_locale($locale)) throw new InvalidArgumentException(sprintf('Invalid locale "%s"', $locale));
$oldLang = self::get_current_locale();

18
lang/de.yml Normal file
View File

@ -0,0 +1,18 @@
de:
CMSMain:
LANGUAGEDROPDOWNLABEL: "Sprache"
CMSMain_left.ss:
GO: "Los"
Form:
LANGAVAIL: "Verfügbare Sprachen"
LANGAOTHER: "Andere Sprachen"
Translatable:
TRANSLATIONS: "Übersetzungen"
CREATE: "Neue Übersetzung erstellen"
NEWLANGUAGE: "Neue Sprache"
CREATEBUTTON: "Erstellen"
EXISTING: "Bestehende Übersetzungen:"
NOTICENEWPAGE: "Bitte speichern Sie diese Seite, bevor Sie eine Übersetzung erstellen."
TRANSLATEPERMISSION: "In %s übersetzen"
TRANSLATEALLPERMISSION: "In alle verfügbaren Sprachen übersetzen"

17
lang/en.yml Normal file
View File

@ -0,0 +1,17 @@
en:
CMSMain:
LANGUAGEDROPDOWNLABEL: "Language"
CMSMain_left.ss:
GO: "Go"
Form:
LANGAVAIL: "Available languages"
LANGAOTHER: "Other languages"
Translatable:
TRANSLATIONS: "Translations"
CREATE: "Create new translation"
NEWLANGUAGE: "New language"
CREATEBUTTON: "Create"
EXISTING: "Existing translations:"
NOTICENEWPAGE: "Please save this page before creating a translation"
TRANSLATEPERMISSION: "Translate %s"
TRANSLATEALLPERMISSION: "Translate into all available languages"

17
lang/en_GB.yml Normal file
View File

@ -0,0 +1,17 @@
en_GB:
CMSMain:
LANGUAGEDROPDOWNLABEL: "Language"
CMSMain_left.ss:
GO: "Go"
Form:
LANGAVAIL: "Available languages"
LANGAOTHER: "Other languages"
Translatable:
TRANSLATIONS: "Translations"
CREATE: "Create new translation"
NEWLANGUAGE: "New language"
CREATEBUTTON: "Create"
EXISTING: "Existing translations:"
NOTICENEWPAGE: "Please save this page before creating a translation"
TRANSLATEPERMISSION: "Translate %s"
TRANSLATEALLPERMISSION: "Translate into all available languages"