Difference between revisions of "Languages"

From Wiki
Jump to navigation Jump to search
m
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
= Two commands to set up the language aspects=
 
= Two commands to set up the language aspects=
Today, with the international use of the UTF-8 standard for input and output encoding, you only need two commands and the '''[[#Language tags|language tag]]''' you want in brackets:
+
Today, with the international use of the UTF-8 standard for input and output encoding, you only need two commands, with the '''[[#Language tags|language tag]]''' you want in brackets:
* <cmd>mainlanguage</cmd>, to set the language of auto-generated language elements, like the title of the table of contents or the appendix.  
+
; {{cmd|mainlanguage[tag]}}:
* <cmd>language</cmd>, to change the hyphenation rules, quotation marks, all that sort of thing, to that of a different language. (The default language is English.)
+
:: to set the language of auto-generated language elements, like the title of the table of contents or the appendix,
 +
:: and to change the hyphenation rules, quotation marks, all that sort of thing, to that of a different language.
 +
; {{cmd|language[tag]}}:
 +
:: to change the hyphenation rules, quotation marks, all that sort of thing, to that of a different language. (The default language is English.)
 +
 
 +
{{cmd|language}} is only needed when you use more than 1 language in a
 +
document, otherwise {{cmd|mainlanguage}} is enough to change labels and
 +
hyphentation patterns.
 +
 
 +
= ConTeXt's markup =
 +
 
 +
ConTeXt has a multilingual interface to enable users to work in their own language. It is specified by setting the ConTeXt interface value in the first line of your input file:
 +
* <code>% interface=en</code> [http://www.pragma-ade.com/general/qrcs/setup-en.pdf commands]
 +
* <code>% interface=nl</code> [http://www.pragma-ade.com/general/qrcs/setup-nl.pdf commando’s]
 +
* <code>% interface=de</code> [http://www.pragma-ade.com/general/qrcs/setup-de.pdf befehle]
 +
* <code>% interface=cz</code> [http://www.pragma-ade.com/general/qrcs/setup-cz.pdf přikazy]
 +
* <code>% interface=fr</code> [http://www.pragma-ade.com/general/qrcs/setup-fr.pdf commandes]
 +
* <code>% interface=it</code> [http://www.pragma-ade.com/general/qrcs/setup-it.pdf comandi]
 +
* <code>% interface=ro</code> [http://www.pragma-ade.com/general/qrcs/setup-ro.pdf comenzile]
  
 
=Language-specific pages=
 
=Language-specific pages=
Line 13: Line 31:
 
* [[Vietnamese]]
 
* [[Vietnamese]]
 
* [[RTL]] for dealing with Right-To-Left texts as well as BiDi (bidirectional) texts
 
* [[RTL]] for dealing with Right-To-Left texts as well as BiDi (bidirectional) texts
 +
* French:  [[French Punctuation]] and [[French spacing]] (old)
  
 
=Language tags=
 
=Language tags=
Line 26: Line 45:
 
=Other links=
 
=Other links=
  
Finally, for older content, we keep a page [[Encodings and Regimes - Old Content]] about including accents, composite characters, and how "ä" and alike were produced in LaTeX/ConTeXt mkii.
+
Finally, for older content, we keep a page [[Encodings and Regimes - Old Content]] about including accents, composite characters, and how "ä" and alike were produced in LaTeX/ConTeXt mkii. [[Second Step]] gave an example for german language.
  
  
[[Category:International]]
+
[[Category:Languages]]
[[Category:Language]]
 

Revision as of 07:42, 1 August 2021

Two commands to set up the language aspects

Today, with the international use of the UTF-8 standard for input and output encoding, you only need two commands, with the language tag you want in brackets:

[[Command/mainlanguage[tag]|\mainlanguage[tag]]]
to set the language of auto-generated language elements, like the title of the table of contents or the appendix,
and to change the hyphenation rules, quotation marks, all that sort of thing, to that of a different language.
[[Command/language[tag]|\language[tag]]]
to change the hyphenation rules, quotation marks, all that sort of thing, to that of a different language. (The default language is English.)

\language is only needed when you use more than 1 language in a document, otherwise \mainlanguage is enough to change labels and hyphentation patterns.

ConTeXt's markup

ConTeXt has a multilingual interface to enable users to work in their own language. It is specified by setting the ConTeXt interface value in the first line of your input file:

Language-specific pages

Language tags

Here's the list of ConTeXt's language tags, also available in the latest official Languages manual. Sources are available).

\usemodule[languages-system]
\loadinstalledlanguages
\showinstalledlanguages

Other links

Finally, for older content, we keep a page Encodings and Regimes - Old Content about including accents, composite characters, and how "ä" and alike were produced in LaTeX/ConTeXt mkii. Second Step gave an example for german language.