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 font
56 # encoding (such as hebrew to LHE). This prevents LyX from outputting
57 # characters that only exist in T1 font encoding (such as "<", ">", "|"
58 # 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 intoducing/
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
296 # not yet supported by polyglossia
298 GuiName "English (Canada)"
300 # PolyglossiaName english
301 # PolyglossiaOpts "variant=canadian"
307 # not yet supported by polyglossia
309 GuiName "French (Canada)"
311 # PolyglossiaName french
312 # PolyglossiaOpts "variant=canadien"
322 PolyglossiaName catalan
323 PolyglossiaOpts "babelshorthands=true"
330 Language chinese-simplified
331 GuiName "Chinese (simplified)"
340 Language chinese-traditional
341 GuiName "Chinese (traditional)"
349 # not supported by babel
352 PolyglossiaName coptic
360 PolyglossiaName croatian
370 PolyglossiaName czech
380 PolyglossiaName danish
386 # not supported by babel
388 GuiName "Divehi (Maldivian)"
389 PolyglossiaName divehi
398 PolyglossiaName dutch
399 PolyglossiaOpts "babelshorthands=true"
409 PolyglossiaName english
415 # Esperanto has no country code because it is an auxiliary language.
416 # We therefore the name of its hunspell dictionary.
420 PolyglossiaName esperanto
429 PolyglossiaName estonian
434 \addto\extrasestonian{\bbl@deactivate{~}}
438 # the preamble definitions are only used due to bugs in the
439 # arabi-package -- remove them if they become unnecessary!
443 PolyglossiaName farsi
445 FontEncoding "LFE,LAE"
449 \DeclareTextSymbol{\guillemotright}{LFE}{62}
450 \DeclareTextSymbol{\guillemotleft}{LFE}{60}
458 PolyglossiaName finnish
464 # We redefine \og and \fg (guillemets) for older french language definitions
469 PolyglossiaName french
474 \addto\extrasfrench{%
475 \providecommand{\og}{\leavevmode\flqq~}%
476 \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
485 PolyglossiaName galician
490 \addto\shorthandsgalician{\galiciandeactivate{~}}
499 InternalEncoding true
500 FontEncoding "T8M,T8K"
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
737 # lithuanian must be loaded locally with babel options,
738 # not globally via class options
742 PolyglossiaName lithuanian
749 Language lowersorbian
750 GuiName "Lower Sorbian"
751 BabelName lowersorbian
752 PolyglossiaName lsorbian
762 PolyglossiaName magyar
768 # not supported by babel
771 PolyglossiaName marathi
776 # mongolian must be loaded locally with babel options,
777 # not globally via class options
778 # not yet supported by polyglossia
788 GuiName "English (New Zealand)"
790 PolyglossiaName english
791 PolyglossiaOpts "variant=newzealand"
798 GuiName "Norwegian (Bokmaal)"
801 PolyglossiaName norsk
808 GuiName "Norwegian (Nynorsk)"
811 PolyglossiaName nynorsk
817 # not supported by babel
820 PolyglossiaName occitan
826 # Currently not supported (file format change!)
827 # Russian orthography from the Petrine orthographic reforms of
828 # 1708 to the 1917 orthographic reform
829 # Language oldrussian
830 # GuiName "Russian (Petrine orthography)"
831 # PolyglossiaName russian
832 # PolyglossiaOpts spelling=old
833 # LangCode ru_petr1708
840 PolyglossiaName polish
850 PolyglossiaName portuges
860 PolyglossiaName romanian
870 PolyglossiaName russian
874 InternalEncoding true
881 PolyglossiaName samin
886 # not supported by babel
889 PolyglossiaName sanskrit
897 PolyglossiaName scottish
907 PolyglossiaName serbian
914 Language serbian-latin
915 GuiName "Serbian (Latin)"
917 PolyglossiaName serbian
918 PolyglossiaOpts "script=latin"
928 PolyglossiaName slovak
937 PolyglossiaName slovenian
947 PolyglossiaName spanish
952 \addto\shorthandsspanish{\spanishdeactivate{~<>}}
956 # there are no spanish shorthands in polyglossia
957 Language spanish-mexico
958 GuiName "Spanish (Mexico)"
960 PolyglossiaName spanish
965 \addto\shorthandsspanish{\spanishdeactivate{~<>.}}
973 PolyglossiaName swedish
979 # not supported by babel
982 # PolyglossiaName syriac
988 # not supported by babel
991 PolyglossiaName tamil
996 # not supported by babel
999 PolyglossiaName telugu
1007 PolyglossiaName thai
1012 \usepackage{thswitch}
1013 EndPostBabelPreamble
1016 # not supported by babel
1019 PolyglossiaName tibetan
1028 PolyglossiaName turkish
1033 \usepackage{xkeyval}
1034 EndPostBabelPreamble
1037 # turkmen must be loaded locally with babel options,
1038 # not globally via class options
1042 PolyglossiaName turkmen
1053 PolyglossiaName ukrainian
1057 InternalEncoding true
1061 Language uppersorbian
1062 GuiName "Upper Sorbian"
1063 BabelName uppersorbian
1064 PolyglossiaName usorbian
1070 # not supported by babel
1073 # PolyglossiaName urdu
1079 # vietnam must be loaded locally with babel options,
1080 # not globally via class options, see
1081 # http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
1083 GuiName "Vietnamese"
1085 PolyglossiaName vietnamese
1096 PolyglossiaName welsh