Skip to content

Commit

Permalink
Merge pull request #123 from Mark-M/patch-1
Browse files Browse the repository at this point in the history
Fix Issue #122: Set default field value to current locale
  • Loading branch information
chillu committed Aug 3, 2013
2 parents a008f92 + 6394f88 commit b90e229
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/controller/TranslatableEditorToolbarExtension.php
Expand Up @@ -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');
}

}
}

0 comments on commit b90e229

Please sign in to comment.