Template:, and

From OpenStreetMap Wiki
Jump to: navigation, search

This shows a localized separator for the last pair of items in comma-separated lists like this: a, and b.

[Edit] [Octicons-sync.svgpurge] Template-info.svg Template documentation

Usage

When enumerating comma-separated lists, the final item follows an "and" coordination conjonction, but not all languages use a comma before it. Look at these examples:

  • English (en) ‒ 1, 2, and 3
  • German (de) ‒ 1, 2, und 3
  • Spanish (es) ‒ 1, 2 y 3
  • French (fr) ‒ 1, 2 et 3
  • Italian (it) ‒ 1, 2 e 3
  • Japanese (ja) ‒ 1、 23
  • Korean (ko) ‒ 1, 2, 3
  • Chinese (zh) ‒ 1、23
  • Hebrew (he) ‒ 1, 2 וגם 3
  • Arabic (ar) ‒ 1، 2 و 3

Note also that Korean already uses a comma for translating "and", so it must not be preceded by a comma and a word separator.

Additionally there's not necessarily a space used as word separator before or after the translation of "and".

This template will match those differences for translating the whole ", and " sequence (shown above on yellow background): use {{, and}} between items without leaving any space before or after it.

You may need to edit this template to add other languages for which the comma is undesirable before the word-separator and the coordination "and". Note that the template implements language fallbacks so (for example) the rule for "pt" also applies by default to "pt-br", the rule for "zh" also applies to "zh-hant" or "zh-hans", and the rule for "fr" also applies by default to "br" (The supported language fallbacks are implemented in {{LangSwitch}}).

Example

1{{,}}{{Int|Word-separator}}2{{, and}}3

renders: "1, 2, and 3".

See also