Credits go to @Gravatronics. Closes #318
--- /dev/null
+{if !$forceSelection|isset}{assign var=forceSelection value=false}{/if}
+<script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ var $availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{@$languageID}: '{$languageName}'{/implode} };
+ var $values = { {implode from=$i18nValues[$elementIdentifier] key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
+ new WCF.MultipleLanguageInput('{@$elementIdentifier}', {if $forceSelection}true{else}false{/if}, $values, $availableLanguages);
+ });
+ //]]>
+</script>
\ No newline at end of file
* @param boolean $requireI18n
* @return boolean
*/
- public function validateValue($elementID, $requireI18n) {
+ public function validateValue($elementID, $requireI18n = false) {
if ($this->isPlainValue($elementID)) {
if ($requireI18n || $this->getValue($elementID) == '') {
return false;