Template talk:Translation table

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

USAGE[edit]

Usage

{{Translation table
  |lang1=text in lang1
  |lang2=text in lang2
  |lang3=text in lang3
  ...
}}

inline=something
optional parameter. (line view...)
hidetitle=something
optional parameter. (if exist hide title...)
width=size
default=180px
Note
Difference with {{Lan}} is that language codes are here default ordered.
Examples
  • Simple

{{Translation table
  |en=This is an example !
  |fr=Ceci est un exemple !
  |ar=هذا مثال !
  |he=זוהי הגדמה !
}}

Internationalization
العربية: هذا مثال !
English: This is an example !
Français : Ceci est un exemple !
עברית: זוהי הדגמה !
  • With inline

{{Translation table|inline=1
  |fr=Ceci est un exemple !
  |en=This is an example !
  |ar=هذا مثال !
  |he=זוהי הדגמה !
}}

Internationalization
العربية: هذا مثال !
 ·
English: This is an example !
 ·
Français : Ceci est un exemple !
 ·
עברית: זוהי הדגמה !
 ·
  • With hidetitle

{{Translation table|hidetitle=1|inline=1|width=75%
  |fr=Ceci est un exemple !
  |en=This is an example !
  |da=Test done !
  |tr=Bu bir örnektir !
  |ar=هذا مثال !
  |he=זוהי הדגמה !
}}

العربية: هذا مثال !
 ·
Dansk: Test done !
 ·
English: This is an example !
 ·
Français : Ceci est un exemple !
 ·
עברית: זוהי הדגמה !
 ·
Türkçe: Bu bir örnektir !
 ·
  • Infobox style
Internationalization
العربية: هذا مثال !
Dansk: Test done !
English: This is an example !
Français : Ceci est un exemple !
עברית: זוהי הדגמה !
Türkçe: Bu bir örnektir !

{{Translation table|infobox=o
  |fr=Ceci est un exemple !
  |en=This is an example !
  |da=Test done !
  |tr=Bu bir örnektir !
  |ar=هذا مثال !
  |he=זוהי הדגמה !
}}

Problem with the template[edit]

The template seems to break interwiki links containing apostrophs, by escaping them with a "\". See the French link in Colchicum autumnale for instance. --Eusebius (talk) 13:49, 14 October 2008 (UTC)[reply]

Presently, it seems to work properly (see below) — Xavier, 01:22, 16 June 2009 (UTC)[reply]
Français : Colchique d'automne

width[edit]

please make it free-floating width, so we are not limited (eg.: Category:Travel trailers) --W!B: (talk) 05:43, 19 October 2008 (UTC)[reply]

Can you suggest how to do this? Can't the "width" parameter help? Then put {{Editprotected}} at the top of this section. — Xavier, 01:22, 16 June 2009 (UTC)[reply]

Windows 2000[edit]

This template doens't seem to work under Windows 2000. -- Marcel Douwe Dekker (talk) 15:31, 2 December 2008 (UTC)[reply]

See also: On Wikipedia[edit]

{{editprotected}}

Please set the following into description W!B: (talk) 04:38, 1 August 2009 (UTC)[reply]

See also:

BTW, can a sysop put the documentation in a separate Template:Translation table/doc page ? Thanks. — Xavier, 18:03, 3 August 2009 (UTC)[reply]
✓ Done Rocket000 (talk) 18:47, 3 August 2009 (UTC)[reply]

arz + pnb[edit]

{{editprotected}} Please, can a sysop add two entries for the {{Arz}} (Egyptian Arabic) and {{Pnb}} (Western Panjabi) languages? I guess the arz line should go just beneath the ar line. As for the pnb line, I don't know.

There is also a bug I have introduced in my previous edits: the {{Wuu}} and {{Gan}} entries (at the end of the source) shouldn't be outside the {{Lan}} template.

If you are not comfortable with editing this template, you can just unprotect it and I will take care of this. Thanks! — Xavier, 00:42, 1 March 2010 (UTC)[reply]

not exactly related with the suggested changed, but any opinion about this possible change Esby (talk) 22:28, 11 March 2010 (UTC)[reply]
I see no problem with breaking the lines this way. This would make the template easier to edit as well as easier to identify changes made by others. I have edited your page in order to reflect the changes I suggest above, I hope you won't mind. (BTW, I wonder by which mediawiki magic this personal page of yours appears as a diff of this template...) — Xavier, 00:02, 12 March 2010 (UTC)[reply]
The magic is just the diff is not made by the title of the page but by the two id that are given. The ids are revision id, meaning they'll design the state of a given article at a given moment.
I'll perform the changes tomorrow evening. Esby (talk) 00:43, 12 March 2010 (UTC)[reply]
Thanks for the explanation about the diff IDs, I hadn't realized this was that simple. I have tested your test template on Water which displays about 150 translations (including arz) and everything looks ok. One slight thing though: due to right-to-left writing, arz translation is showing before ar despite the arz line is below the ar one. I'm not sure this is what is expected. Thank you in advance for applying the changes. — Xavier, 00:37, 13 March 2010 (UTC)[reply]

Replace be-x-old with be-tarask[edit]

Langtag be-x-old is used in compatibility reason only (except Wikipedia). Instead of it be-tarask is used. Please replace be-x-old with be-tarask or add this one as fallback feature (like {{{be-tarask|{{{be-x-old|}}}}}}). Thanks! Wizardist (talk) 18:17, 8 May 2010 (UTC) {{Editprotected}}[reply]

Update cause still don't completed. --Renessaince (talk) 14:42, 12 July 2017 (UTC)[reply]

sli[edit]

Please add the above language code. --Jonny84 (talk) 19:31, 4 January 2011 (UTC)[reply]

Paragraph option[edit]

{{ Editprotected }} Is there a way these translations could be put in a paragraph instead of a column format?

The translations would take up less space, especially when there are more than a few languages. For example, see this related template, {{On Wikipedia}}, in use here: Category:Maps.

Compare to here: Category:Economic history.

Also, could some skilled template coders have a look at my latest request at Template talk:On Wikipedia. Rocket000 does not seem to be editing currently. --Timeshifter (talk) 19:13, 22 January 2011 (UTC)[reply]

"inline=1", but it makes searching for a language difficult. --AVRS (talk) 22:37, 22 January 2011 (UTC)[reply]
Thanks. The documentation needs to be clearer. I might try to rewrite some of it once I understand some of the options better. It says "inline=something". What are the options for "something" and what do the options mean?
Also, how does one set the width to maximum: width=size --Timeshifter (talk) 06:40, 23 January 2011 (UTC)[reply]
"Something" is anything non-empty. For maximum width, use "100%". --AVRS (talk) 12:24, 23 January 2011 (UTC)[reply]
Thanks again. I clarified the doc page a little. Template:Translation table/doc. --Timeshifter (talk) 18:06, 23 January 2011 (UTC)[reply]

Borked[edit]

Somehow the layout on Category:Kings of Clubs is broken.

When I added it, the translations were all on one line. Now each language is on a separate line and a dot follows on a new line. Neither this template nor any others seem to have been edited since July though.

How can we fix this? --  Docu  at 11:32, 9 September 2012 (UTC)[reply]

Seems to be an edit on Template:Description. --  Docu  at 11:34, 9 September 2012 (UTC)[reply]

Display language of the user[edit]

Can this template be modified to only display the language of the user? --Robert.Allen (talk) 19:00, 7 September 2013 (UTC)[reply]

I agree that this would be a great improvement; in the template's current form, some instances expand to fill a large percentage of smaller displays with useless translations. Also, it would be very helpful to have a brief explanation of its purpose as the examples don't provide any clues. Lambtron (talk) 13:02, 2 April 2015 (UTC)[reply]
@Robert.Allen and Lambtron: I had exactly the same in mind when creating {{Other language}} in 2014-10. Enjoy :) .    FDMS  4    21:11, 2 April 2015 (UTC)[reply]

100% is more than 100%[edit]

See Category:Photographs – the table is longer than the horizontal lines of the UI and {{Photographs}}.    FDMS  4    21:25, 15 September 2014 (UTC)[reply]

You're perfectly right, because of margins, borders and paddings, which are added to the 100% width of the inner content.
To fix this, the outer table (used instead of div to make sure it will not collide with suyrrounding floats) should have itself no horizontal margins, no borders and no cellpadding if giving width=100% then the inner cell may contain div with no margins, but a border and necessary paddings for the content.
The alternative would be to use CSS3 with "box-sizing:border-box", but not enough browsers support it; the other alternative (forcing the old "IE quirks" mode) should not be used at all. verdy_p (talk) 21:26, 5 October 2016 (UTC)[reply]

Add Hausa[edit]

{{Edit request}} Add ha For, e.g. Category:Jesus Christ. —Justin (koavf)TCM 15:52, 25 December 2015 (UTC)[reply]

User:Koavf you need to be more specific. I will need to know what to change and with what. --Jarekt (talk) 04:11, 27 December 2015 (UTC)[reply]
@Jarekt: This table does not display Hausa text now. Please add a line that reads:
-->{{#if:{{{ha|}}}|{{ha|{{{ha}}}|inline={{{inline|}}}}}{{#if:{{{inline|}}}|{{·}}  }}}}<!--
. Thanks. —Justin (koavf)TCM 05:00, 27 December 2015 (UTC)[reply]
✓ Done --Zhuyifei1999 (talk) 08:53, 27 December 2015 (UTC)[reply]
@Zhuyifei1999: Thanks a lot. It's surprising to me that there are languages of any size which aren't included. —Justin (koavf)TCM 06:20, 2 January 2016 (UTC)[reply]

Difference between Template:Translation table and Template:Multilingual description[edit]

I don't see too much the difference between Template:Translation table and Template:Multilingual description. For me I find the Template:Multilingual description better. Am I right ? Would-it be possible to merge the 2 templates ? --Berdea (talk) 08:46, 13 June 2016 (UTC)[reply]

Translation table offers inline possibilities (see the examples), but it is not supported by the mld scripts: when the usage is inlined, languages are not hidden. Esby (talk) 18:11, 13 June 2016 (UTC)[reply]

Cantonese have missed in this template[edit]

{{Editprotected}} Can somebody add Cantonese language with code "yue" please? see {{Yue}}. --PQ77wd (talk) 22:24, 19 January 2018 (UTC)[reply]

✓ Done --Jarekt (talk) 14:46, 22 February 2018 (UTC)[reply]

Problem with template[edit]

This template takes too much space as each language is followed by an empty line beginning by «  ·  ». This is an example :

Deutsch: Meteorologie
English: Meteorology
Esperanto: Meteologio
Français : Météorologie
Italiano: Meteorologia
日本語: 気象学
中文:气象学


Could someone fix this so the «  ·  » should be only preceding a language description like below?

 · Deutsch: Meteorologie

 · Eesti: Meteoroloogia

 · English: Meteorology

 · Esperanto: Meteologio

 · Français : Météorologie

 · Italiano: Meteorologia

 · 日本語: 気象学

 · 中文:气象学

— Preceding unsigned comment added by Pierre cb (talk • contribs) 10:50, 13 May 2022 (UTC)[reply]

@Jarekt: Just a wild guess: Could the above issue, reported on May 13th, be related to your change on Module:Description from May 11th? — Preceding unsigned comment added by Raymond (talk • contribs) 09:03, 16 May 2022 (UTC)[reply]
I previewed this page with the previous version, and reverting Jarekt’s edit would indeed fix this bug. However, there may be a better solution than just blindly reverting, and I don’t want to make more edits than necessary to a module used on 30% of Commons’ all pages, so I’ll let him fix it properly in one go. —Tacsipacsi (talk) 14:34, 16 May 2022 (UTC)[reply]
@Jarekt: again because I have forgotten to sign and the ping was lost I guess. Raymond 16:50, 16 May 2022 (UTC)[reply]
Raymond, Thank you for alerting me. I will try to figure out what is going on. --Jarekt (talk) 02:24, 17 May 2022 (UTC)[reply]
@Raymond and Pierre cb: That change of Module:Description did not change the text formatting, but it did standardize the way boolean parameters are interpreted, so it is more in line with other templates. For example the old template (for a moment preserved in {{Description/sandbox}}) would interpret "inline=false" the same as "inline=true" while the current version tries to interpret boolean values so "yes", "y", "true", "t", "1", "on" are interpreted as "true" and "no', "n", "false", "f", "0" and "off" are false. So a {{Description/sandbox |text_lang=en |text=Hell |inline=false}}o gives "a
English: Hell
o" and a {{Description|text_lang=en |text=Hell |inline=false}}o gives "a
English: Hell
o". The above code after changing first line from {{Translation table|inline=1|hidetitle=1|width=100% to {{Translation table|inline=t|hidetitle=t|width=100%, would show up as
Deutsch: Meteorologie
 ·  ·
English: Meteorology
 ·
Esperanto: Meteologio
 ·
Français : Météorologie
 ·
Italiano: Meteorologia
 ·
日本語: 気象学
 ·
中文:气象学
 ·
I assume it will be quite rare for for someone to accidentally run into this problem, and I can adjust the documentation and search for pages affected by this change. --Jarekt (talk) 03:27, 17 May 2022 (UTC)[reply]
That seems to work! Pierre cb (talk) 03:33, 17 May 2022 (UTC)[reply]
@Jarekt Thank you very much. I have updated the docu. Maybe you can search for the pages affected by this page? Raymond 06:24, 17 May 2022 (UTC)[reply]
Better ask for a bot as there is too many of them. Pierre cb (talk) 12:53, 17 May 2022 (UTC)[reply]
So the {{Translation table}} can be either in "inline" or not "inline" mode. I fixed the template so that no natter what is the input to the "inline" parameter one of those modes will be chosen and the display will look good. I am also fixing cases where people used "inline=o" to indicate online mode and changing them to "inline=1". A temporary directory for tracking those is Category:Description Template with ambiguous inline parameter. --Jarekt (talk) 14:02, 18 May 2022 (UTC)[reply]