Wikimedia Developer Support

Page language differs from the wiki language


This question is about the Translate extension.
It is possible to create a page in language that differs from the wiki language so that translations were made right and Special:MyLanguage links worked correctly?


It’s not clear what you are asking. In general you can enable $wgPageLanguageUseDB and use Special:PageLanguage to set page language, but that has nothing to do with Translate so that’s probably not what you meant.


This is not a simple question.
Wiki language = English

Suppose there is a page LifeOfCats
Special:MyLangauge works like this:
LifeOfCats = English
LifeOfCats/fr = French
LifeOfCats/ru = Russian
If I create a page in Russian, it should obviously be LifeOfCats/ru
When I translate it into English, I want that the parent page LifeOfCats to be created. But there is no such possibility.
If I create LifeOfCats/ru and assign it the language Russian, then the translation into English produces LifeOfCats/ru/en. It is wrong. The English version must be LifeOfCats - the parent page relative to other languages. Only then will the hierarchy of translations and Special: MyLanguage work correctly

Is there an easy way to create pages with a source language different from the wiki language so that they can be translated?


I’m not that familiar with Translate but at a glance it uses the page language so setting that as described above should work. The source page will always be the root, so you’ll end up with LifeOfCats (Russian), LifeOfCats/en (English) and LifeOfCats/fr (French) - not sure why that would be a problem.


Unfortunately, this is not so. Maybe we’d better like if to be so. But this is not how it works. Special:MyLanguage links will not work either.