From 6394f887de6a63ae9e8ea6a98d4297c9aa523109 Mon Sep 17 00:00:00 2001 From: Mark-M Date: Wed, 17 Jul 2013 15:06:42 +0100 Subject: [PATCH] Set default field value to current locale --- code/controller/TranslatableEditorToolbarExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/controller/TranslatableEditorToolbarExtension.php b/code/controller/TranslatableEditorToolbarExtension.php index d76e48e..97c309d 100644 --- a/code/controller/TranslatableEditorToolbarExtension.php +++ b/code/controller/TranslatableEditorToolbarExtension.php @@ -4,9 +4,10 @@ class TranslatableEditorToolbarExtension extends DataExtension { function updateLinkForm(&$form) { $field = new LanguageDropdownField('Language', _t('CMSMain.LANGUAGEDROPDOWNLABEL', 'Language')); + $field->setValue(Translatable::get_current_locale()); $field->setForm($form); $form->Fields()->insertBefore($field, 'internal'); Requirements::javascript('translatable/javascript/HtmlEditorField.Translatable.js'); } -} \ No newline at end of file +}