See meta:Community Wishlist/Wishes/Enable subcategorizing translated pages on Commons. I think that's currently not possible but if it is, users can't do so and it's not done automatically.
Help talk:Extension:Translate/Flow
The Translate extension does not handle categories in a special way. That's why we have left it up to translation admins to decide whether they want all translations to be in one category or in separate language categories and this is reflected in our documentation: Help:Extension:Translate/Page translation administration#Markup examples.
This might change a little in the future if https://phabricator.wikimedia.org/T285463 gets implemented.
I have this on my page:
[[Kategorie:Beispiele{{#translation:}}|Beispiele]]
and I get
[[Kategorie:Beispiele/en]]
[[Kategorie:Beispiele{{#translation:}}|<translate>Beispiele</translate>]]
does help at all since the result is the same as above. However since I cannot expect English speaking people to know what "Beispiele" means the only way is seems to label the category.
This may be a noob question. I am sure there is a way but I currently do not get it. This example does not cover it so I am a bit lost.
Currently, as far as I know, MediaWiki does not support changing category names from what they actually are. There is a task requesting to support this: task T26139.
@Nikerabbit : has plans changed on this task by any chance ? Because in fact this is what I request in my comment below.
I am not sure why you are asking me. My priorities are currently elsewhere.
Sorry, I did ask because I thought you were in charge of this task.
I will wait to see it resolved or - better! - try to solve it myself when I get familiar with MediaWiki code.
Anyway you are always of good advice, and you helped me a lot. Thank you !
Ouch, admittedly I have never labeled a category differently. I took it for granted that this is possible. I guess this will be a nice feature with regard to content translation. Thanks a lot for pointing to the issue.
Just an idea: one could try to transclude the translated content of the page display title of the corresponding Translation name space page:
{{#ifexist: {{Translations:Kategorie:Beispiel/Page display title{{#translation:}}}}<!--
then transclucde content via {{…}}
-->|{{Translations:Kategorie:Beispiel/Page display title{{#translation:}}}}<!--
else
-->|Kategorie:Beispiel{{#translation:}}
}}
… or in general with the magic word {{FULLPAGENAME}}
:
{{#ifexist: {{Translations:{{FULLPAGENAME}}/Page display title{{#translation:}}}}<!--
then-->|{{Translations:{{FULLPAGENAME}}/Page display title{{#translation:}}}}<!--
else-->|{{FULLPAGENAME}}{{#translation:}}
}}
I just realized (for the record so to say) that the page I’m testing in #ifexist: must be coded correctly as Translations:…
and not as page transclusion {{Translations:…}}
:
{{#ifexist: Translations:{{FULLPAGENAME}}/Page display title{{translation:}}<!--
then -->|{{Translations:{{FULLPAGENAME}}/Page display title{{translation:}}}}<!--
else -->|{{FULLPAGENAME}}
}}
Thanks for your suggestion. The idea I came up with is to do
<translate>Categories:</translate> [[:Category:General{{#translation:}}|<translate>General</translate>]]
[[Category:General{{|translation:}}]]
and add the HIDDENCAT behaviour switch to "Category:General{{#translation:}}". This is a bit of work depending on how many categories there are as well as make the display of the category link [[:Category:General{{#translation:}}|<translate>General</translate>]] appear as if the added category was never hidden but I quite like it.
Hi,
I came upon this help topic and it helped a lot.
I need to do a slightly different thing than @Kghbln : my goal is to have the translated category name, but point it to the translated link
Like "Catégorie:Blanc" displays "Catégorie:White" but points to "Catégorie:Blanc/en"
Hi, today I've updated my wiki and all the extensions. Everything is wokring so far. But when clicking on translate button for a site, it will only show an empty section. I.e. clicking
translate on the page "Manuals:Test" will lead to ".../index.php?title=Special:Translate&group=page-Manuals%3ATest&action=page&filter=".
Here it only shows "Translate to German" (I'm from Germany). But the editor to translate is missing. Also I can't select any other language to translate to. As far as I can remember I could select any language before.
The above buttons also work, I can view the translation stats. Here all my sites are shown as translated.
What is missing here? Checking the debug log and console did not give me any clue. Please help, thanks!!
It sounds much like a JavaScript problem. Maybe the upgrade coincided with you disabling JavaScript (using NoScript, browser preferences etc.)? Or there is some JavaScript error on the browser console? If your wiki is publicly available, it would make debugging a lot easier if you could share its URL.
Hey,
Is it not possible to translate Sidebar without ULS?
I have a page called "Resources", English version of it works fine, but any translated not,
I believe it's because resources is one of the folders in mediawiki engine, and when that page gets translated, it changes to /wiki/Resources/de
Is there any solution for this, how to fix that in .htaccess? Or renaming the page is the only way?
fixed
I'm managing a MediaWiki site with Polish as the primary language. However, we occasionally receive content in English that needs to be incorporated seamlessly into our site, including adopting Polish page titles/URLs without the "/pl" suffix typically used for translated content. For example, I wish to translate the title "My new page" from English to Polish and use it as the main content, ensuring the URL reflects the Polish version without indicating it's a translation. Our site primarily translates content from English (or Spanish) to Polish, displaying it in Polish by default. I'm looking for advice on how to manually mark these articles for translation and adjust their URLs to blend with our Polish content. Any suggestions on setting this up efficiently would be greatly appreciated.
That's not supported by the Translate extension because general solution is not possible due to naming conflicts. You can create redirects manually.
Hi, Our main page has the following source code: <languages/><translate></translate>{{Main Page}}. So there is nothing to edit or translate (except the title "Main Page") and people should edit or translate the template instead. Is there a possibility to hide the "Translate this page" link, so I can replace it with a link to the Template? Thanks.
I don’t think there’s an officially supported solution for that, but I don’t think it makes sense either. You should decide whether you want the page to be translatable: if yes, the link shouldn’t be hidden; if no, the page shouldn’t be marked for translation. If nothing except for the title is translatable, then there is something that’s translatable: the title.
You have some options:
- (Supported and IMO best solution) Merge the template into the main page
- (Supported) Keep the link for translating the main page, add a link in wikitext to
Special:Translate/page-Template:Main Page
- (Unsupported, I recommend against it) Add the link in wikitext and hide the link for translating the main page itself using the CSS
.mw-pt-translate-header { display: none; }
I just expanded the Setup section of FlaggedRevs, an extension that gave me lots of problems that could have been prevented with proper instructions.
I was taken aback by these <translate>
tags. I did the best I could, but I have no idea if I broke something or did something wrong. Is this really the best way to make MediaWiki multilingual?
You are not the only one, though most people appreciate the value of supporting translations even though the method has shortcomings. We are exploring how to make the process better: https://meta.wikimedia.org/wiki/Research:Translatable_Pages_Research
Thanks. User:Shirayuki has altered my edit and made it compatible with the translation system... I think.
I honestly have no idea how this convoluted system works. I can't make heads or tails of it. For example, what are these <!--T:[number]-->
markers?
They are explained for example in Help:Extension:Translate/Page translation example.
I manage an English wiki with 7,000 pages written in English. To enhance its bilingual nature, I've generated machine translations for all those pages. These translations are stored in text files located in separate subdirectories like "/translations/es" and "/translations/fr".
Right now whenever I import my text files into MediaWiki I use Manual:ImportTextFiles.php/, is there a certain namespace or formatting that I have to use to upload the translations?
Is there a way I can easily import these pages into the Translate Extension?
When we mark a page for translation it always generates the /en language which is the same as the source. Can this be switched off or is it a requirement? If the latter, please indicate this clearly in the documentation. (@Wimjongman)
[22:17] <wimjongman> Does the translate module always need the /en language even if this is the source?
[22:28] <Nemo_bis> wimjongman: only if it's the source
[22:31] <wimjongman> So if english is the source I cannot block the /en generation?
[22:34] <Nemo_bis> wimjongman: with sufficient effort you might be able to break it, but are you sure you understand the consequences?
[22:34] <Nemo_bis> What are you trying to achieve?
[22:36] <wimjongman> Nemo_bis: I just want to understand if this is the intended behavior.
[22:38] <Nemo_bis> wimjongman: yes, it is
[22:39] <Nemo_bis> The subpage is needed so that all language codes are treated equally and so that a version of the page without Translate's markup is always available
[22:39] <Nemo_bis> Without the /en subpage, you would not really be able to make templates translatable, for instance. The subpages are what gets transcluded
[22:42] <wimjongman> Nemo_bis: I understand. Thanks. Another thing is that our translators have found the Special:MyLanguage tag and starting to put that in the source pages. Is that best practice?
[23:16] <Nemo_bis> wimjongman: yes, we currently have no way to redirect links to the correct page without wikitext changes
[22:46] <wimjongman> Nemo_bis: is SpecialMyLanguage needed in combination with $wgTranslatePageTranslationULS?
[23:16] <Nemo_bis> $wgTranslatePageTranslationULS only works for the first click
It is not possible to switch this off with configuration. The existence of such pages is mentioned in Help:Extension:Translate/Page translation administration
Is there a way to stop the source language pages appearing in search results?
We end up with two sets of search results for the page in the source language, one with /en, and one without.