@things-factory/meta-ui 7.0.1-alpha.15 → 7.0.1-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,4 +101,19 @@ export class TermsUtil {
101
101
  defaultValue: defaultValue || termName
102
102
  })
103
103
  }
104
+
105
+ /**
106
+ * @description termKey로 다국어 변환하여 parameters로 파라미터 처리하여 리턴, 변환값이 없다면 defaultValue 리턴, defaultValue가 없다면 null 리턴
107
+ ***********************************************
108
+ * @param {String} termKey 용어 키 : {용어 카테고리}'.'{용어 이름}
109
+ * @param {Object} parameters 용어 이름에 파라미터가 있는 경우 파라미터 치환 처리할 오브젝트 데이터 {key1 : value1, key2 : value2} 형식 ...
110
+ * @param {String} defaultValue
111
+ * @returns termKey 다국어 변환 값
112
+ */
113
+ static t(termKey, parameters, defaultValue) {
114
+ return i18next.t(termKey, {
115
+ ...parameters,
116
+ defaultValue: defaultValue || termKey
117
+ })
118
+ }
104
119
  }