Wiki translation

Deutsch, Français, Português - Please note: the non-English forums are not actively maintained
User avatar
Touriste
Posts: 626
Joined: Mon May 20, 2013 2:20 am
Location: France, Ile de France

Re: Wiki translation

Post by Touriste » Fri May 31, 2013 3:56 pm

Also, can we show the country name by their country name ?
I mean, for german -> Deutsche for french -> Français ?

User avatar
LFist
Posts: 17
Joined: Wed May 29, 2013 10:42 pm

Re: Wiki translation

Post by LFist » Fri May 31, 2013 4:19 pm

Done.

(I don't know the correctly translated forms of Portuguese/Swedish/Dutch)

User avatar
PauloBelato
Posts: 16
Joined: Tue May 21, 2013 5:15 pm
Location: Brazil
Contact:

Re: Wiki translation

Post by PauloBelato » Fri May 31, 2013 9:20 pm

Started today to translate to portuguese, so I added the proper portuguese translation to the muntilang template. From what I saw, I think that template could be optimized, considering every page should be named the same on all languages, only adding the language ISO code at the end. Maybe make it reckonize automatically if a page of language X exists or not. Using Magic words, seems feasable.

Ok, after some time finding shortcuts, I could create a new template that works similarly to the one now for linking other languages, but without the need to write the entire page name for each language. Template here.

Example:
{{User:Mobyduck/draft|en||fr|pt}} or {{User:Mobyduck/draft|1=en|3=fr|4=pt}}

This will show the links for English, French and Portuguese articles.

Edit2:

Added multilangual support to the resources templates. Example:

{{Wealth|2=de}} will show "{img} Wohlstand"
{{Wealth|80|de}} will show "80 {img}"
Both imagens linking to "Wealth/de".

I used the translations from here to update the templates. Those languages without an official translation there were left in english. So, if you know the correct translation, edit the templates, it should be easy to do so.

User avatar
Touriste
Posts: 626
Joined: Mon May 20, 2013 2:20 am
Location: France, Ile de France

Re: Wiki translation

Post by Touriste » Sat Jun 01, 2013 1:19 am

I can not make it work. I tried {{food/fr}} {{food=3}} {{food|3=fr}} {{food|3}}
Did I do something wrong ?

User avatar
PauloBelato
Posts: 16
Joined: Tue May 21, 2013 5:15 pm
Location: Brazil
Contact:

Re: Wiki translation

Post by PauloBelato » Sat Jun 01, 2013 2:24 am

Touriste wrote:I can not make it work. I tried {{food/fr}} {{food=3}} {{food|3=fr}} {{food|3}}
Did I do something wrong ?
The language code is the second variable, while the value is the first.
If I was to write in portuguese, I would have to use the following: {{food|3|pt}}, to show the number plus an image; or {{food|2=pt}} to just show the image plus a link to the resource article. The first code will show:

3 Image

And the second:

Image Alimento

This way we can use a single template for all languages, instead of one template for each.

User avatar
Touriste
Posts: 626
Joined: Mon May 20, 2013 2:20 am
Location: France, Ile de France

Re: Wiki translation

Post by Touriste » Sat Jun 01, 2013 3:16 am

Thanks so much :)

User avatar
Touriste
Posts: 626
Joined: Mon May 20, 2013 2:20 am
Location: France, Ile de France

Re: Wiki translation

Post by Touriste » Sat Jun 01, 2013 1:05 pm

What can you do about the "See also" template ?
I looked at the edit page, can I just change "see also" to the french translation and that will work ?
Can you easily do the same for see also as you made for the other template ?

User avatar
PauloBelato
Posts: 16
Joined: Tue May 21, 2013 5:15 pm
Location: Brazil
Contact:

Re: Wiki translation

Post by PauloBelato » Sat Jun 01, 2013 3:12 pm

I will try adding support to that template as well, though that template is quite the mess.

Edit: Because there are too many strings to translate (not only See also, but all the ands), the better solution would be to create subpages instead of adding the support as code. So, instead of {{See also|ml=fr|Reus: Translation}}, we would use {{See also/fr|Reus: Translation}}.

The only other solution would be to create a meta-template that would contain all the translations, and all templates would use it for multilingual support, but I'm not sure if it would slow down the wiki or not.

Edit2: Should be working now. Will add a documentation for reference later. For now, the code should be:

{{See also|language=fr|Reus:Translation}}

Using it will still show See also: Reus:Translation. You need to add the correct translation here.

User avatar
PauloBelato
Posts: 16
Joined: Tue May 21, 2013 5:15 pm
Location: Brazil
Contact:

Re: Wiki translation

Post by PauloBelato » Mon Jun 03, 2013 8:35 pm

I was wondering if we should allow the usage of {{DISPLAYTITLE}} for translated articles. This function allows the editors to choose which title to show on top of the page. So, for example, if we used {{DISPLAYTITLE:Biomas}} on the article Biomes/pt, it would instead should Biomas, on the top of the page.

According to this, it is possible, but the variable $wgRestrictDisplayTitle must be set to false. It is set to true by default because it could make it harder to create wikilinks between articles: a new editor would see the title page Biomas, try to link to it on another article by writing [[Biomas]] but would get a red link (broken link) in return. So I would like to know if it is worth the risk (mentioned above) to make the article titles "better".

User avatar
Touriste
Posts: 626
Joined: Mon May 20, 2013 2:20 am
Location: France, Ile de France

Re: Wiki translation

Post by Touriste » Mon Jun 03, 2013 11:11 pm

I guess we, wiki translator, know how to use it correctly and I say it worth the risk once we translated the full wiki !

Post Reply