Topic on Project:Support desk

Korg (talkcontribs)

Hello,

Is there a way to translate a page on the fly? I know there is the Translate extension, but what I'm looking for is a solution without having to set each translatable page manually. The text to translate would be words and short phrases, not prose.

I have in mind the selectors that can be found at the top of the pages on zhwiki, hiwiki and hywiki. What is the name of these extensions/features?

Thank you in advance.

Malyacko (talkcontribs)
Korg (talkcontribs)

Can the ContentTranslation extension be used to translate and directly display translated text of content pages, without any particular intervention?

I will try to be more explicit. Suppose there is the heading "References" in thousands of pages. If the user changes the display language via the Universal Language Selector, e.g. in Hungarian, the heading would be automatically translated as "Források".

There is a solution with the {{int:x}} magic word, but I would be interested in a simpler approach.

Ciencia Al Poder (talkcontribs)

The selectors at the top of such pages are because those are language variants, not different languages, and MediaWiki can perform the translation internally. See Writing systems#LanguageConverter

Korg (talkcontribs)

Thank you for the link!

Korg (talkcontribs)

Sorry, the topic is not resolved. Perhaps I have not been clear enough.

I would like to find a way to automatically translate words and short phrases in content pages.

Currently it can be done with the help of templates, the {{int:}} magic word, or a call to Wikidata, but somehow it could be cumbersome if there are thousands of pages involved, and not really easy for new users.

Perhaps this request is beyond the scope of the Support desk, and I should open a request elsewhere?

AhmadF.Cheema (talkcontribs)

Maybe you can try bulk find and replace?

For example, find all instances of "short phrase" on the Wiki and simultaneously replace all of them with something like "{{int:short phrase}}".

Korg (talkcontribs)

Thanks for the suggestion! But I think I would avoid the use of the {{int:}} magic word.

As new pages would be created, this magic word would have to be automatically added (Ok, this could be done by a bot).

Also, it seems that this magic word was intended for interface messages, so only administrators could create or update such messages (but perhaps it could be used with messages outside the MediaWiki namespace?).

Ciencia Al Poder (talkcontribs)
Korg (talkcontribs)