Merge branch 'release/5.31.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / editor / definedterm / operation / CreateDefinedTermOperation.java
index cc7f7a85f56d0e2b78ee91bd819b2e571f01fc2a..d2df0c47781994f7dd5e3496a2bf1505f97db23a 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
 import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;\r
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 \r
 /**\r
@@ -52,10 +53,10 @@ public class CreateDefinedTermOperation extends AbstractPostOperation<DefinedTer
                        throws ExecutionException {\r
            TermDto newTerm = null;\r
            if(parent instanceof TermDto){\r
-               newTerm = CdmStore.getService(ITermService.class).addNewTerm(definedTermInput.getTermType(), parent.getUuid(), addTermAsKindOf);\r
+               newTerm = CdmStore.getService(ITermService.class).addNewTerm(definedTermInput.getTermType(), parent.getUuid(), addTermAsKindOf, PreferencesUtil.getGlobalLanguage());\r
            }\r
            else if(parent instanceof TermVocabularyDto){\r
-               newTerm = CdmStore.getService(IVocabularyService.class).addNewTerm(definedTermInput.getTermType(), parent.getUuid());\r
+               newTerm = CdmStore.getService(IVocabularyService.class).addNewTerm(definedTermInput.getTermType(), parent.getUuid(), PreferencesUtil.getGlobalLanguage());\r
            }\r
 //         newTerm.setTitleCache("_" + newTerm.getTitleCache());\r
                return postExecute(newTerm);\r