Vanilla 1 Documentation Archive

 
 
vanilla:administrators:languages
Table of Contents

Languages

Small Modifications

If you want to make a change to the text that appears in Vanilla, you need to find the code that represents that text in the theme files. Vanilla uses code-words to represent bits of text. It then uses a language dictionary (basically an associative array) that matches code-words to actual text. The default dictionary file is in /languages/English/definitions.php, but you shouldn’t ever edit that file. Instead, if you want to change some text, find the code-word / definition in that file and then copy it into your conf/language.php file. From there you can change it to whatever you want using the following method:

$Context->Dictionary['CodeWord'] = 'This is my customized text!';

If you need to add a code-words for your extension, you should use Context::SetDefinition():

$Context->SetDefinition('CodeWord', 'This is my customized text!');

This method will not overwrite a dictionary entry already set in /languages/English/definitions.php or conf/language.php; the definition will be still customizable from conf/language.php.

Languages Form

Using this form you can change the language file used by Vanilla. By default Vanilla only comes with the English language file. You can download the latest language files from the Vanilla Add-ons Directory.

Installing new languages

Once you’ve found and downloaded your new language definition, you must place it in Vanilla’s language folder. Your language file should be contained within it’s own folder. The path to your language file should be similar to this:

/path/to/vanilla/languages/language_name/definitions.php

Once your language is in the correct place, you can enable it in the settings tab’s “Languages” form. If you don’t see your language file there after you’ve uploaded it, make sure that the language file you downloaded is compatible with your version of Vanilla and that you uploaded it to the correct place.

 
 
 
 
vanilla/administrators/languages.txt · Last modified: 2009/03/28 14:19
Vanilla 1 Documentation archive (Wiki by DokuWiki)