1 ##########################################################################
3 # Languages supported by LyX.
9 # HasGuiSupport <true|false>
10 # BabelName <babelname>
11 # PolyglossiaName <polyglossianame>
12 # PolyglossiaOpts "<language-specific options>"
14 # FontEncoding <font encoding>
15 # QuoteStyle <danish|english|french|german|polish|swedish>
16 # InternalEncoding <true|false>
18 # AsBabelOptions <true|false>
19 # LangCode <language_code>
20 # LangVariety <language_variety>
22 # <extra latex code inserted before babel>
25 # <extra latex code inserted after babel>
26 # EndPostBabelPreamble
27 # Requires <requirement>
33 # * Omitted elements will be treated as empty (if string) or "false"
35 # * When HasGuiSupport is true, the language is candidate to appear in
36 # the list of possible GUI languages in the Preferences dialog. It
37 # will actually appear there only if a corresponding .mo file can be
38 # found among the translations. When several languages correspond to
39 # the same translation -- like English, English (US) and English
40 # (UK) -- try to select the entry that is most generic -- here
42 # * The QuoteStyle arguments correspond to the following styles:
43 # - danish: >>text<< >text< (inward guillemets)
44 # - english: ``text'' `text' (66_99)
45 # - french: <<text>> <text> (outward guillemets)
46 # - german: ,,text`` ,text` (99/66)
47 # - polish: ,,text'' ,text' (99/99)
48 # - swedish: ''text'' 'text' (99_99)
49 # Note that the option names have been selected (rather arbitrarily)
50 # because the respective styles are common in the respective countries.
51 # Of course this does not imply any fixed relation to those countries.
52 # * Encoding is not relevant for XeTeX (which is utf8 always), and if
53 # Document > Settings > Language > Encoding is not set to "Language
55 # * InternalEncoding is used to tell LyX that babel internally sets a
56 # non-standard font encoding (such as hebrew to LHE or greek to LGR).
57 # If True, LyX cares for characters/macros that do not exist in
58 # some font encodings ("<", ">", "|" and straight quote). See bug #5091.
59 # * "FontEncoding none" tells LyX that fontenc should not be loaded with this
61 # * AsBabelOptions advices LyX to pass the languages locally to babel, not
62 # globally to the class. Some languages (basically those not directly
63 # supported by babel) need this.
64 # FIXME: in this case, we might still need to pass the other languages
65 # globally, for the use of other packages (such as varioref).
66 # * LangCode is also used for spellchecking and thesaurus, where the
67 # dictionaries are named accordingly. Thus, check this when introducing/
68 # changing language codes (especially aspell, thesaurus).
69 # TODO: maybe use Best Current Practice (BCP 47) codes for LangCode
70 # http://www.rfc-editor.org/rfc/bcp/bcp47.txt
71 # http://www.w3.org/International/articles/language-tags/
72 # http://www.iana.org/assignments/language-subtag-registry
73 # * LangVariety is used by the aspell spellchecker to differentiate
74 # dictionaries for different varieties of a given language (e.g. German
75 # pre-1998 and post-1998 spelling). The aspell dictionaries are named
76 # language[_REGION][-variety].multi, e.g. de-alt.multi for "German (old
77 # spelling)" (see http://aspell.net/man-html/Dictionary-Naming.html)
79 ##########################################################################
82 # LyX-internal languages
88 PolyglossiaName ignore
103 # not yet supported by polyglossia
115 PolyglossiaName albanian
122 GuiName "English (USA)"
124 PolyglossiaName english
125 PolyglossiaOpts "variant=american"
131 # In Babel, this is supported since v. 1.8a of babel-greek (2013-12-03)
132 # We introduce it with LyX 2.2 to give the support time to settle.
133 Language ancientgreek
134 GuiName "Greek (ancient)"
137 \languageattribute{greek}{ancient}
139 PolyglossiaName greek
140 PolyglossiaOpts variant=ancient
143 InternalEncoding true
148 # FIXME: dummy babel language for arabic_arabtex to be able
149 # to switch the language the way of the ArabTeX-package
150 Language arabic_arabtex
151 GuiName "Arabic (ArabTeX)"
160 # polyglossia uses "Arabic" for the lang environment
161 Language arabic_arabi
162 GuiName "Arabic (Arabi)"
164 PolyglossiaName arabic
167 FontEncoding "LFE,LAE"
173 # not supported by babel
176 PolyglossiaName armenian
183 GuiName "English (Australia)"
185 PolyglossiaName english
186 PolyglossiaOpts "variant=australian"
192 # In polyglossia, this is supported since release 1.33.4 (May 2014)
193 # We introduce it with LyX 2.2 to give the support time to settle.
195 GuiName "German (Austria, old spelling)"
197 PolyglossiaName german
198 PolyglossiaOpts "variant=austrian,spelling=old,babelshorthands=true"
204 # In polyglossia, this is supported since release 1.33.4 (May 2014)
205 # We introduce it with LyX 2.2 to give the support time to settle.
207 GuiName "German (Austria)"
209 PolyglossiaName german
210 PolyglossiaOpts "variant=austrian,babelshorthands=true"
220 PolyglossiaName bahasai
229 PolyglossiaName bahasam
239 PolyglossiaName basque
244 \addto\extrasbasque{\bbl@deactivate{~}}
248 # not yet supported by polyglossia
259 GuiName "Portuguese (Brazil)"
262 PolyglossiaName brazil
271 PolyglossiaName breton
278 GuiName "English (UK)"
280 PolyglossiaName english
281 PolyglossiaOpts "variant=british"
290 PolyglossiaName bulgarian
297 # not yet supported by polyglossia
299 GuiName "English (Canada)"
301 # PolyglossiaName english
302 # PolyglossiaOpts "variant=canadian"
308 # not yet supported by polyglossia
310 GuiName "French (Canada)"
312 # PolyglossiaName french
313 # PolyglossiaOpts "variant=canadien"
323 PolyglossiaName catalan
324 PolyglossiaOpts "babelshorthands=true"
331 Language chinese-simplified
332 GuiName "Chinese (simplified)"
341 Language chinese-traditional
342 GuiName "Chinese (traditional)"
350 # not supported by babel
353 PolyglossiaName coptic
361 PolyglossiaName croatian
371 PolyglossiaName czech
381 PolyglossiaName danish
387 # not supported by babel
389 GuiName "Divehi (Maldivian)"
390 PolyglossiaName divehi
399 PolyglossiaName dutch
400 PolyglossiaOpts "babelshorthands=true"
410 PolyglossiaName english
416 # Esperanto has no country code because it is an auxiliary language.
417 # We therefore the name of its hunspell dictionary.
421 PolyglossiaName esperanto
430 PolyglossiaName estonian
435 \addto\extrasestonian{\bbl@deactivate{~}}
439 # the preamble definitions are only used due to bugs in the
440 # arabi-package -- remove them if they become unnecessary!
444 PolyglossiaName farsi
446 FontEncoding "LFE,LAE"
450 \DeclareTextSymbol{\guillemotright}{LFE}{62}
451 \DeclareTextSymbol{\guillemotleft}{LFE}{60}
459 PolyglossiaName finnish
465 # We redefine \og and \fg (guillemets) for older french language definitions
470 PolyglossiaName french
475 \addto\extrasfrench{%
476 \providecommand{\og}{\leavevmode\flqq~}%
477 \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
486 PolyglossiaName galician
491 \addto\shorthandsgalician{\galiciandeactivate{~}}
504 # german does not use a country code (due to the variety)
506 GuiName "German (old spelling)"
508 PolyglossiaName german
509 PolyglossiaOpts "spelling=old,babelshorthands=true"
520 PolyglossiaName german
521 PolyglossiaOpts "babelshorthands=true"
527 # In Babel, this is supported since release 2.7 of babel-german (Dec 2013)
528 # We introduce it with LyX 2.2 to give the support time to settle.
529 # In polyglossia, this is supported since release 1.33.6 (May 2015)
530 # We use german until TL 2015 is out, though.
532 GuiName "German (Switzerland)"
533 BabelName nswissgerman
534 PolyglossiaName german
535 PolyglossiaOpts "babelshorthands=true"
536 # PolyglossiaOpts "variant=swiss,babelshorthands=true"
542 # In Babel, this is supported since release 2.7 of babel-german (Dec 2013)
543 # In polyglossia, this is supported since release 1.33.6 (May 2015)
544 # We use ngerman until TL 2015 is out, though.
545 Language german-ch-old
546 GuiName "German (Switzerland, old spelling)"
547 BabelName swissgerman
548 PolyglossiaName german
549 PolyglossiaOpts "spelling=old,babelshorthands=true"
550 # PolyglossiaOpts "variant=swiss,spelling=old,babelshorthands=true"
560 PolyglossiaName greek
563 InternalEncoding true
568 Language polutonikogreek
569 GuiName "Greek (polytonic)"
570 BabelName polutonikogreek
571 PolyglossiaName greek
572 PolyglossiaOpts "variant=polytonic"
575 InternalEncoding true
584 PolyglossiaName hebrew
587 InternalEncoding true
588 # Hebrew babel loads the font encodings
589 # itself in the appropriate order
595 # not supported by babel
598 PolyglossiaName hindi
603 # Currently not supported (file format change!)
604 # "hungarian" is a synonym for the "magyar" babel language option
605 # "hungarian" might be used for special purposes,
606 # see http://www.math.bme.hu/latex/magyar_pre_tug2004.pdf
608 # GuiName "Hungarian"
609 # BabelName hungarian
617 PolyglossiaName icelandic
623 # Interlingua has no official country code because it is an auxiliary
624 # language. We therefore the name of its hunspell dictionary.
626 GuiName "Interlingua"
628 BabelName interlingua
629 PolyglossiaName interlingua
637 PolyglossiaName irish
647 PolyglossiaName italian
653 # japanese must be loaded locally with babel options,
654 # not globally via class options
655 # http://www.lyx.org/trac/ticket/4597#c4
656 # Since japanese does not load fontenc, we set
657 # InternalEncoding to true.
666 InternalEncoding true
671 Language japanese-cjk
672 GuiName "Japanese (CJK)"
678 # not yet supported by polyglossia
679 # not supported by babel
686 \AtBeginDocument{\fontencoding{T2A}\selectfont}
698 # not yet supported by polyglossia
707 # not supported by babel
715 # There is no country code for Latin because it is a dead language.
716 # We therefore the name of its hunspell dictionary.
720 PolyglossiaName latin
725 # latvian must be loaded locally with babel options,
726 # not globally via class options
730 PolyglossiaName latvian
733 # FontEncoding L7x # (required for hyphenation but not set by babel)
738 # lithuanian must be loaded locally with babel options,
739 # not globally via class options
743 PolyglossiaName lithuanian
751 Language lowersorbian
752 GuiName "Lower Sorbian"
753 BabelName lowersorbian
754 PolyglossiaName lsorbian
764 PolyglossiaName magyar
770 # not supported by babel
773 PolyglossiaName marathi
778 # mongolian must be loaded locally with babel options,
779 # not globally via class options
780 # not yet supported by polyglossia
791 GuiName "English (New Zealand)"
793 PolyglossiaName english
794 PolyglossiaOpts "variant=newzealand"
801 GuiName "Norwegian (Bokmaal)"
804 PolyglossiaName norsk
811 GuiName "Norwegian (Nynorsk)"
814 PolyglossiaName nynorsk
820 # not supported by babel
823 PolyglossiaName occitan
829 # Currently not supported (file format change!)
830 # Russian orthography from the Petrine orthographic reforms of
831 # 1708 to the 1917 orthographic reform
832 # Language oldrussian
833 # GuiName "Russian (Petrine orthography)"
834 # PolyglossiaName russian
835 # PolyglossiaOpts spelling=old
836 # LangCode ru_petr1708
843 PolyglossiaName polish
846 # FontEncoding QX # (required for hyphenation but not set by babel)
854 PolyglossiaName portuges
864 PolyglossiaName romanian
874 PolyglossiaName russian
884 PolyglossiaName samin
889 # not supported by babel
892 PolyglossiaName sanskrit
900 PolyglossiaName scottish
910 PolyglossiaName serbian
918 Language serbian-latin
919 GuiName "Serbian (Latin)"
921 PolyglossiaName serbian
922 PolyglossiaOpts "script=latin"
932 PolyglossiaName slovak
941 PolyglossiaName slovenian
951 PolyglossiaName spanish
956 \addto\shorthandsspanish{\spanishdeactivate{~<>}}
960 # there are no spanish shorthands in polyglossia
961 Language spanish-mexico
962 GuiName "Spanish (Mexico)"
964 PolyglossiaName spanish
969 \addto\shorthandsspanish{\spanishdeactivate{~<>.}}
977 PolyglossiaName swedish
983 # not supported by babel
986 # PolyglossiaName syriac
992 # not supported by babel
995 PolyglossiaName tamil
1000 # not supported by babel
1003 PolyglossiaName telugu
1011 PolyglossiaName thai
1017 \usepackage{thswitch}
1018 EndPostBabelPreamble
1021 # not supported by babel
1024 PolyglossiaName tibetan
1033 PolyglossiaName turkish
1038 \usepackage{xkeyval}
1039 EndPostBabelPreamble
1042 # turkmen must be loaded locally with babel options,
1043 # not globally via class options
1047 PolyglossiaName turkmen
1058 PolyglossiaName ukrainian
1065 Language uppersorbian
1066 GuiName "Upper Sorbian"
1067 BabelName uppersorbian
1068 PolyglossiaName usorbian
1074 # not supported by babel
1077 # PolyglossiaName urdu
1083 # vietnam must be loaded locally with babel options,
1084 # not globally via class options, see
1085 # http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
1087 GuiName "Vietnamese"
1089 PolyglossiaName vietnamese
1100 PolyglossiaName welsh