Skip to content

Instantly share code, notes, and snippets.

@elevenfour
elevenfour / lang.xml
Created Aug 2, 2017
Gender specific language variables in WCF
View lang.xml
<item name="wcf.elevenfour.userNote.welcome"><![CDATA[¡Bienvenid{if $__wcf->getUserProfileHandler()->gender == 2}a{else}o{/if}!]]></item>
View en.xml
<?xml version="1.0" encoding="UTF-8"?>
<language xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/vortex/language.xsd" languagecode="en" languagename="English" countrycode="gb">
<category name="wcf.acl">
<item name="wcf.acl.access"><![CDATA[Restricted Access]]></item>
<!-- a comment for testing purposes -->
</category>
<category name="wcf.acl.option">
<item name="wcf.acl.option.com.woltlab.wcf.label.canViewLabel"><![CDATA[Can view labels]]></item>
View de.xml
<?xml version="1.0" encoding="UTF-8"?>
<language xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/vortex/language.xsd" languagecode="de" languagename="Deutsch" countrycode="de">
<category name="wcf.acl">
<item name="wcf.acl.access"><![CDATA[Zugangsbeschränkung]]></item>
<!-- ein Kommentar zum Testen -->
</category>
<category name="wcf.acl.option">
<item name="wcf.acl.option.com.woltlab.wcf.label.canViewLabel"><![CDATA[Kann Labels sehen]]></item>
<item name="wcf.acl.option.com.woltlab.wcf.label.canSetLabel"><![CDATA[Kann Labels setzen]]></item>
You can’t perform that action at this time.