Page 4 of 7

Re: Wiki translation

Posted: Fri May 31, 2013 3:56 pm
by Touriste
Also, can we show the country name by their country name ?
I mean, for german -> Deutsche for french -> Fran├žais ?

Re: Wiki translation

Posted: Fri May 31, 2013 4:19 pm
by LFist
Done.

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

Re: Wiki translation

Posted: Fri May 31, 2013 9:20 pm
by PauloBelato
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.

Re: Wiki translation

Posted: Sat Jun 01, 2013 1:19 am
by Touriste
I can not make it work. I tried {{food/fr}} {{food=3}} {{food|3=fr}} {{food|3}}
Did I do something wrong ?

Re: Wiki translation

Posted: Sat Jun 01, 2013 2:24 am
by PauloBelato
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.

Re: Wiki translation

Posted: Sat Jun 01, 2013 3:16 am
by Touriste
Thanks so much :)

Re: Wiki translation

Posted: Sat Jun 01, 2013 1:05 pm
by Touriste
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 ?

Re: Wiki translation

Posted: Sat Jun 01, 2013 3:12 pm
by PauloBelato
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.

Re: Wiki translation

Posted: Mon Jun 03, 2013 8:35 pm
by PauloBelato
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".

Re: Wiki translation

Posted: Mon Jun 03, 2013 11:11 pm
by Touriste
I guess we, wiki translator, know how to use it correctly and I say it worth the risk once we translated the full wiki !