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 the default encoding used with TeX fonts.
53 # It is only used if Document > Settings > Language > Encoding
54 # is set to "Language Default" and "use non-TeX fonts" is FALSE.
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).
59 # It is not required for standard encodings like T2A. See bug #5091.
60 # * "FontEncoding none" tells LyX that fontenc should not be loaded with this
62 # * AsBabelOptions advices LyX to pass the languages locally to babel, not
63 # globally to the class. Some languages (basically those not directly
64 # supported by babel) need this.
65 # FIXME: in this case, we might still need to pass the other languages
66 # globally, for the use of other packages (such as varioref).
67 # * LangCode is also used for spellchecking and thesaurus, where the
68 # dictionaries are named accordingly. Thus, check this when introducing/
69 # changing language codes (especially aspell, thesaurus).
70 # TODO: maybe use Best Current Practice (BCP 47) codes for LangCode
71 # http://www.rfc-editor.org/rfc/bcp/bcp47.txt
72 # http://www.w3.org/International/articles/language-tags/
73 # http://www.iana.org/assignments/language-subtag-registry
74 # * LangVariety is used by the aspell spellchecker to differentiate
75 # dictionaries for different varieties of a given language (e.g. German
76 # pre-1998 and post-1998 spelling). The aspell dictionaries are named
77 # language[_REGION][-variety].multi, e.g. de-alt.multi for "German (old
78 # spelling)" (see http://aspell.net/man-html/Dictionary-Naming.html)
80 ##########################################################################
83 # LyX-internal languages
89 PolyglossiaName ignore
104 # not yet supported by polyglossia
116 PolyglossiaName albanian
123 GuiName "English (USA)"
125 PolyglossiaName english
126 PolyglossiaOpts "variant=american"
132 # In Babel, this is supported since v. 1.8a of babel-greek (2013-12-03)
133 # We introduce it with LyX 2.2 to give the support time to settle.
134 Language ancientgreek
135 GuiName "Greek (ancient)"
138 \languageattribute{greek}{ancient}
140 PolyglossiaName greek
141 PolyglossiaOpts variant=ancient
144 InternalEncoding true
149 # FIXME: dummy babel language for arabic_arabtex to be able
150 # to switch the language the way of the ArabTeX-package
151 Language arabic_arabtex
152 GuiName "Arabic (ArabTeX)"
161 # polyglossia uses "Arabic" for the lang environment
162 Language arabic_arabi
163 GuiName "Arabic (Arabi)"
165 PolyglossiaName arabic
168 FontEncoding "LFE,LAE"
174 # not supported by babel
177 PolyglossiaName armenian
184 GuiName "English (Australia)"
186 PolyglossiaName english
187 PolyglossiaOpts "variant=australian"
193 # In polyglossia, this is supported since release 1.33.4 (May 2014)
194 # We introduce it with LyX 2.2 to give the support time to settle.
196 GuiName "German (Austria, old spelling)"
198 PolyglossiaName german
199 PolyglossiaOpts "variant=austrian,spelling=old,babelshorthands=true"
205 # In polyglossia, this is supported since release 1.33.4 (May 2014)
206 # We introduce it with LyX 2.2 to give the support time to settle.
208 GuiName "German (Austria)"
210 PolyglossiaName german
211 PolyglossiaOpts "variant=austrian,babelshorthands=true"
221 PolyglossiaName bahasai
230 PolyglossiaName bahasam
240 PolyglossiaName basque
245 \addto\extrasbasque{\bbl@deactivate{~}}
249 # not yet supported by polyglossia
260 GuiName "Portuguese (Brazil)"
263 PolyglossiaName brazil
272 PolyglossiaName breton
279 GuiName "English (UK)"
281 PolyglossiaName english
282 PolyglossiaOpts "variant=british"
291 PolyglossiaName bulgarian
298 # not yet supported by polyglossia
300 GuiName "English (Canada)"
302 # PolyglossiaName english
303 # PolyglossiaOpts "variant=canadian"
309 # not yet supported by polyglossia
311 GuiName "French (Canada)"
313 # PolyglossiaName french
314 # PolyglossiaOpts "variant=canadien"
324 PolyglossiaName catalan
325 PolyglossiaOpts "babelshorthands=true"
332 Language chinese-simplified
333 GuiName "Chinese (simplified)"
342 Language chinese-traditional
343 GuiName "Chinese (traditional)"
351 # not supported by babel
354 PolyglossiaName coptic
362 PolyglossiaName croatian
372 PolyglossiaName czech
382 PolyglossiaName danish
388 # not supported by babel
390 GuiName "Divehi (Maldivian)"
391 PolyglossiaName divehi
400 PolyglossiaName dutch
401 PolyglossiaOpts "babelshorthands=true"
411 PolyglossiaName english
417 # Esperanto has no country code because it is an auxiliary language.
418 # We therefore the name of its hunspell dictionary.
422 PolyglossiaName esperanto
431 PolyglossiaName estonian
436 \addto\extrasestonian{\bbl@deactivate{~}}
440 # the preamble definitions are only used due to bugs in the
441 # arabi-package -- remove them if they become unnecessary!
445 PolyglossiaName farsi
447 FontEncoding "LFE,LAE"
451 \DeclareTextSymbol{\guillemotright}{LFE}{62}
452 \DeclareTextSymbol{\guillemotleft}{LFE}{60}
460 PolyglossiaName finnish
466 # We redefine \og and \fg (guillemets) for older french language definitions
471 PolyglossiaName french
476 \addto\extrasfrench{%
477 \providecommand{\og}{\leavevmode\flqq~}%
478 \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
487 PolyglossiaName galician
492 \addto\shorthandsgalician{\galiciandeactivate{~}}
505 # german does not use a country code (due to the variety)
507 GuiName "German (old spelling)"
509 PolyglossiaName german
510 PolyglossiaOpts "spelling=old,babelshorthands=true"
521 PolyglossiaName german
522 PolyglossiaOpts "babelshorthands=true"
528 # In Babel, this is supported since release 2.7 of babel-german (Dec 2013)
529 # We introduce it with LyX 2.2 to give the support time to settle.
530 # In polyglossia, this is supported since release 1.33.6 (May 2015)
531 # We use german until TL 2015 is out, though.
533 GuiName "German (Switzerland)"
534 BabelName nswissgerman
535 PolyglossiaName german
536 PolyglossiaOpts "babelshorthands=true"
537 # PolyglossiaOpts "variant=swiss,babelshorthands=true"
543 # In Babel, this is supported since release 2.7 of babel-german (Dec 2013)
544 # In polyglossia, this is supported since release 1.33.6 (May 2015)
545 # We use ngerman until TL 2015 is out, though.
546 Language german-ch-old
547 GuiName "German (Switzerland, old spelling)"
548 BabelName swissgerman
549 PolyglossiaName german
550 PolyglossiaOpts "spelling=old,babelshorthands=true"
551 # PolyglossiaOpts "variant=swiss,spelling=old,babelshorthands=true"
561 PolyglossiaName greek
564 InternalEncoding true
569 Language polutonikogreek
570 GuiName "Greek (polytonic)"
571 BabelName polutonikogreek
572 PolyglossiaName greek
573 PolyglossiaOpts "variant=polytonic"
576 InternalEncoding true
585 PolyglossiaName hebrew
588 InternalEncoding true
589 # Hebrew babel loads the font encodings
590 # itself in the appropriate order
596 # not supported by babel
599 PolyglossiaName hindi
604 # Currently not supported (file format change!)
605 # "hungarian" is a synonym for the "magyar" babel language option
606 # "hungarian" might be used for special purposes,
607 # see http://www.math.bme.hu/latex/magyar_pre_tug2004.pdf
609 # GuiName "Hungarian"
610 # BabelName hungarian
618 PolyglossiaName icelandic
624 # Interlingua has no official country code because it is an auxiliary
625 # language. We therefore the name of its hunspell dictionary.
627 GuiName "Interlingua"
629 BabelName interlingua
630 PolyglossiaName interlingua
638 PolyglossiaName irish
648 PolyglossiaName italian
654 # japanese must be loaded locally with babel options,
655 # not globally via class options
656 # http://www.lyx.org/trac/ticket/4597#c4
657 # Since japanese does not load fontenc, we set
658 # InternalEncoding to true.
667 InternalEncoding true
672 Language japanese-cjk
673 GuiName "Japanese (CJK)"
679 # not yet supported by polyglossia
680 # not supported by babel
687 \AtBeginDocument{\fontencoding{T2A}\selectfont}
699 # not yet supported by polyglossia
708 # not supported by babel
716 # There is no country code for Latin because it is a dead language.
717 # We therefore the name of its hunspell dictionary.
721 PolyglossiaName latin
726 # latvian must be loaded locally with babel options,
727 # not globally via class options
731 PolyglossiaName latvian
734 # FontEncoding L7x # (required for hyphenation but not set by babel)
739 # lithuanian must be loaded locally with babel options,
740 # not globally via class options
744 PolyglossiaName lithuanian
752 Language lowersorbian
753 GuiName "Lower Sorbian"
754 BabelName lowersorbian
755 PolyglossiaName lsorbian
765 PolyglossiaName magyar
771 # not supported by babel
774 PolyglossiaName marathi
779 # mongolian must be loaded locally with babel options,
780 # not globally via class options
781 # not yet supported by polyglossia
792 GuiName "English (New Zealand)"
794 PolyglossiaName english
795 PolyglossiaOpts "variant=newzealand"
802 GuiName "Norwegian (Bokmaal)"
805 PolyglossiaName norsk
812 GuiName "Norwegian (Nynorsk)"
815 PolyglossiaName nynorsk
821 # not supported by babel
824 PolyglossiaName occitan
830 # Currently not supported (file format change!)
831 # Russian orthography from the Petrine orthographic reforms of
832 # 1708 to the 1917 orthographic reform
833 # Language oldrussian
834 # GuiName "Russian (Petrine orthography)"
835 # PolyglossiaName russian
836 # PolyglossiaOpts spelling=old
837 # LangCode ru_petr1708
844 PolyglossiaName polish
847 # FontEncoding QX # (required for hyphenation but not set by babel)
855 PolyglossiaName portuges
865 PolyglossiaName romanian
875 PolyglossiaName russian
885 PolyglossiaName samin
890 # not supported by babel
893 PolyglossiaName sanskrit
901 PolyglossiaName scottish
911 PolyglossiaName serbian
919 Language serbian-latin
920 GuiName "Serbian (Latin)"
922 PolyglossiaName serbian
923 PolyglossiaOpts "script=Latin"
933 PolyglossiaName slovak
942 PolyglossiaName slovenian
952 PolyglossiaName spanish
957 \addto\shorthandsspanish{\spanishdeactivate{~<>}}
961 # there are no spanish shorthands in polyglossia
962 Language spanish-mexico
963 GuiName "Spanish (Mexico)"
965 PolyglossiaName spanish
970 \addto\shorthandsspanish{\spanishdeactivate{~<>.}}
978 PolyglossiaName swedish
984 # not supported by babel
987 # PolyglossiaName syriac
993 # not supported by babel
996 PolyglossiaName tamil
1001 # not supported by babel
1004 PolyglossiaName telugu
1012 PolyglossiaName thai
1018 \usepackage{thswitch}
1019 EndPostBabelPreamble
1022 # not supported by babel
1025 PolyglossiaName tibetan
1034 PolyglossiaName turkish
1039 \usepackage{xkeyval}
1040 EndPostBabelPreamble
1043 # turkmen must be loaded locally with babel options,
1044 # not globally via class options
1048 PolyglossiaName turkmen
1059 PolyglossiaName ukrainian
1066 Language uppersorbian
1067 GuiName "Upper Sorbian"
1068 BabelName uppersorbian
1069 PolyglossiaName usorbian
1075 # not supported by babel
1078 # PolyglossiaName urdu
1084 # vietnam must be loaded locally with babel options,
1085 # not globally via class options, see
1086 # http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
1088 GuiName "Vietnamese"
1090 PolyglossiaName vietnamese
1101 PolyglossiaName welsh