<dl id="languageIDs" class="marginTop{if $errorField == 'languageIDs'} formError{/if}">
<dt><label for="languageIDs">{lang}wcf.acp.language.multilingualism.languages{/lang}</label></dt>
<dd class="floated">
- {htmlCheckboxes options=$languages name=languageIDs selected=$languageIDs disableEncoding=true}
+ {foreach from=$languages item='language'}
+ <label><input type="checkbox" name="languageIDs[]" value="{@$language->languageID}"{if $language->languageID == $defaultLanguageID} checked="checked" disabled="disabled"{elseif $language->languageID|in_array:$languageIDs} checked="checked"{/if} /> {$language}</label>
+ {/foreach}
{if $errorField == 'languageIDs'}
<small class="innerError">
*/
public $neededPermissions = array('admin.language.canManageLanguage');
- // data
- // todo: comment
+ /**
+ * indicates if multilingualism is enabled
+ * @var integer
+ */
public $enable = 0;
+
+ /**
+ * ids of selected available languages
+ * @var array<integer>
+ */
public $languageIDs = array();
+
+ /**
+ * list of available content languages
+ * @var array<wcf\data\language\Language>
+ */
public $languages = array();
- public $languageList = array();
/**
* @see wcf\page\IPage::readParameters()
$this->enable = 1;
}
}
-
- $this->languageList = LanguageFactory::getInstance()->getLanguages();
}
/**
parent::assignVariables();
WCF::getTPL()->assign(array(
+ 'defaultLanguageID' => LanguageFactory::getInstance()->getDefaultLanguageID(),
'enable' => $this->enable,
'languageIDs' => $this->languageIDs,
- 'languages' => $this->languageList
+ 'languages' => $this->languages
));
}
<item name="wcf.acp.language.list"><![CDATA[Languages]]></item>
<item name="wcf.acp.language.multilingualism"><![CDATA[Multilingualism]]></item>
<item name="wcf.acp.language.multilingualism.enable"><![CDATA[Enable multilingualism]]></item>
- <item name="wcf.acp.language.multilingualism.enable.description"><![CDATA[Enabling miltilingualism provides the ability to associate user-generated content with a specific language; Newly created content is automatically associated with the user’s interface language. Users may filter content for specific languages through their settings.]]></item>
+ <item name="wcf.acp.language.multilingualism.enable.description"><![CDATA[Enabling multilingualism provides the ability to associate user-generated content with a specific language; Newly created content is automatically associated with the user’s interface language. Users may filter content for specific languages through their settings.]]></item>
<item name="wcf.acp.language.multilingualism.languages"><![CDATA[Available Languages]]></item>
<item name="wcf.acp.language.multilingualism.languages.error.empty"><![CDATA[You need to select at least two languages.]]></item>
<item name="wcf.acp.language.setAsDefault"><![CDATA[Set As Default]]></item>