Vanilla 2.0.11 added a new way for an application's locales to be managed to make it easier for site administrators to change the language of their sites. The new locale packs are very similar to the old way language definitions so converting them is quite straight forward.
Create an empty locale pack with the proper info array. There is a skeleton locale pack in the vanilla distribution that you can copy to start out. You can also just create a folder in
/locales and add a
definitions.phpfile with the following at the beginning:
$LocaleInfo['FolderName'] = array( 'Locale' => 'en-CA' // The code of the locale 'Name' => 'The name of the locale.' 'Description' => 'Locale description goes here.', // Be as descriptive as possible. 'Version' => '1.0', // A version number compatible with php's version_compare(). 'Author' =>; 'Your name here.', 'AuthorEmail' => 'Your email here', // optional 'AuthorUrl' => 'Your url here' // optional );
The old language definitions will either be in one file or scattered amongst a bunch of different files. To copy them into the new locale pack you can do one of the following:
definitions.phpfile of the new locale pack below the info array you entered above.
definitions.php. You can rename to something like
vanilla_definitions.phpetc. to keep your locale pack organized if you want.
That's all you have to do. Your language definitions have been converted and are ready to use.
|Edited November 2011 by Todd|