Topic on Project:Support desk

How can I install and enable LanguageConverter in Mediawiki1.33.0

9
Summary by Jingkaimori

Notice if $wgLanguageCode is set to something that doesn't support language variants.Presumably module is hardcoded english since it contains lua and not written text.$wgLanguageCode can not be set to something like 'zh-Hans'

Jingkaimori (talkcontribs)
Malyacko (talkcontribs)

Hi, could you be more specific? What is the name of "the related .php file"?

Jingkaimori (talkcontribs)

There is no /language folder in my Mediawiki software.Can I just add this folder to the Mediawiki's base path? If not, what should I do?

Bawolff (talkcontribs)

respectfully, you should stop looking at Mediawiki source files. All your posts are basically misinterpreting how mediawiki works. There is basically no reason you would have to modify any mediawiki includes files (other than adding things to the /extensions) If you didnt have the language directory nothing in mediawiki would work.


LanguageConverter is included with mediawiki by default. There are only a few languages it supports, and it will only be enabled if $wgLanguageCode is set to one of these languages (like zh or sr. If $wgUsePigLatinVariant also en)

What is your $wgLanguageCode set to, and what is the value of any other language config

Jingkaimori (talkcontribs)

I have found the /language folder,but the LanguageConverter.php isnot available yet.How can I enable this class?

Malyacko (talkcontribs)

By being clearer. :) Nobody knows what "isnot available yet" means, nobody knows steps to reproduce, nobody knows which output you get where after which exact steps...

Jingkaimori (talkcontribs)

I'm sorry for incomplete statements.

I add script below to my /LocalSettings.php:

$wgUsePigLatinVariant = true;

but the toolbar named 大陆简体 or Igpay Latin is only shown when navigating a page in namespace Module , and the translating flag such as

-{zh-cn:代码; zh-tw:原始碼;}-

is not translated and remain as it is in the source code.

Bawolff (talkcontribs)

That probably means that $wgLanguageCode is set to something that doesn't support language variants (presumably module is hardcoded english since it contains lua and not written text). What do you have $wgLanguageCode set to? If you want to use Chinese, it needs to be set to 'zh' (And *not* something like 'zh-Hans')

Jingkaimori (talkcontribs)

The problem is solved.Thank you all.