User:Egor/How to add a language
Jump to navigation
Jump to search
- If the language does not exist in MediaWiki's Names.php, you have to add it manually. (This is the case for alternative translations)
- In
/var/www/thpatch/w/LocalSettings.php
add a line like$wgExtraLanguageNames['xx'] = 'My new language';
. - Generate new UniversalLanguageSelector search data, to make the new language searchable by its title in addition to its language code:
php extensions/UniversalLanguageSelector/data/LanguageNameIndexer.php
- Add patch → language code mapping to the thcrap_tl_patches hook located at Patch:Supported languages.
- Ensure that this actually worked by running
mysql thpatch -e "SELECT * FROM tpc_tl_patches WHERE tl_patch = 'lang_xx';"
. - If it didn't work,
cd /var/www/thpatch/w/extensions/TouhouPatchCenter/maintenance
and run./kick.sh "Patch:Supported languages"
.
- Create Patch:Lang xx with the following as content, modifying the dependencies as needed.
{{thcrap Patch Info |title=My new language patch |dependencies=nmlgc/base_tsa, nmlgc/base_tasofro, nmlgc/script_latin, nmlgc/western_name_order }}
- Create Portal:Xx with
{{Portal text}}
as content. - Add a portal link to the main page.
- Add a flag at File:Flag xx.svg.
- If the language is built into MediaWiki, someone could've added some pages prematurely. Make sure to kick them (the pages).