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 # not supported by babel
135 PolyglossiaName amharic
140 # In Babel, this is supported since v. 1.8a of babel-greek (2013-12-03)
141 # We introduce it with LyX 2.2 to give the support time to settle.
142 Language ancientgreek
143 GuiName "Greek (ancient)"
146 \languageattribute{greek}{ancient}
148 PolyglossiaName greek
149 PolyglossiaOpts variant=ancient
152 InternalEncoding true
157 # FIXME: dummy babel language for arabic_arabtex to be able
158 # to switch the language the way of the ArabTeX-package
159 Language arabic_arabtex
160 GuiName "Arabic (ArabTeX)"
169 # polyglossia uses "Arabic" for the lang environment
170 Language arabic_arabi
171 GuiName "Arabic (Arabi)"
173 PolyglossiaName arabic
176 FontEncoding "LFE,LAE"
182 # not supported by babel
185 PolyglossiaName armenian
191 # not supported by babel
194 PolyglossiaName asturian
201 GuiName "English (Australia)"
203 PolyglossiaName english
204 PolyglossiaOpts "variant=australian"
210 # In polyglossia, this is supported since release 1.33.4 (May 2014)
211 # We introduce it with LyX 2.2 to give the support time to settle.
213 GuiName "German (Austria, old spelling)"
215 PolyglossiaName german
216 PolyglossiaOpts "variant=austrian,spelling=old,babelshorthands=true"
222 # In polyglossia, this is supported since release 1.33.4 (May 2014)
223 # We introduce it with LyX 2.2 to give the support time to settle.
225 GuiName "German (Austria)"
227 PolyglossiaName german
228 PolyglossiaOpts "variant=austrian,babelshorthands=true"
238 PolyglossiaName bahasai
247 PolyglossiaName bahasam
257 PolyglossiaName basque
262 \addto\extrasbasque{\bbl@deactivate{~}}
266 # not yet supported by polyglossia
276 # not yet supported by polyglossia
286 GuiName "Portuguese (Brazil)"
289 PolyglossiaName brazil
298 PolyglossiaName breton
305 GuiName "English (UK)"
307 PolyglossiaName english
308 PolyglossiaOpts "variant=british"
317 PolyglossiaName bulgarian
324 # not yet supported by polyglossia
326 GuiName "English (Canada)"
328 # PolyglossiaName english
329 # PolyglossiaOpts "variant=canadian"
335 # not yet supported by polyglossia
337 GuiName "French (Canada)"
339 # PolyglossiaName french
340 # PolyglossiaOpts "variant=canadien"
350 PolyglossiaName catalan
351 PolyglossiaOpts "babelshorthands=true"
358 Language chinese-simplified
359 GuiName "Chinese (simplified)"
368 Language chinese-traditional
369 GuiName "Chinese (traditional)"
377 # not supported by babel
380 PolyglossiaName coptic
388 PolyglossiaName croatian
398 PolyglossiaName czech
408 PolyglossiaName danish
414 # not supported by babel
416 GuiName "Divehi (Maldivian)"
417 PolyglossiaName divehi
426 PolyglossiaName dutch
427 PolyglossiaOpts "babelshorthands=true"
437 PolyglossiaName english
443 # Esperanto has no country code because it is an auxiliary language.
444 # We therefore the name of its hunspell dictionary.
448 PolyglossiaName esperanto
457 PolyglossiaName estonian
462 \addto\extrasestonian{\bbl@deactivate{~}}
466 # the preamble definitions are only used due to bugs in the
467 # arabi-package -- remove them if they become unnecessary!
471 PolyglossiaName farsi
473 FontEncoding "LFE,LAE"
477 \DeclareTextSymbol{\guillemotright}{LFE}{62}
478 \DeclareTextSymbol{\guillemotleft}{LFE}{60}
486 PolyglossiaName finnish
492 # We redefine \og and \fg (guillemets) for older french language definitions
497 PolyglossiaName french
502 \addto\extrasfrench{%
503 \providecommand{\og}{\leavevmode\flqq~}%
504 \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
513 PolyglossiaName friulan
523 PolyglossiaName galician
528 \addto\shorthandsgalician{\galiciandeactivate{~}}
541 # german does not use a country code (due to the variety)
543 GuiName "German (old spelling)"
545 PolyglossiaName german
546 PolyglossiaOpts "spelling=old,babelshorthands=true"
557 PolyglossiaName german
558 PolyglossiaOpts "babelshorthands=true"
564 # In Babel, this is supported since release 2.7 of babel-german (Dec 2013)
565 # We introduce it with LyX 2.2 to give the support time to settle.
566 # In polyglossia, this is supported since release 1.33.6 (May 2015)
567 # We use german until TL 2015 is out, though.
569 GuiName "German (Switzerland)"
570 BabelName nswissgerman
571 PolyglossiaName german
572 PolyglossiaOpts "babelshorthands=true"
573 # PolyglossiaOpts "variant=swiss,babelshorthands=true"
579 # In Babel, this is supported since release 2.7 of babel-german (Dec 2013)
580 # In polyglossia, this is supported since release 1.33.6 (May 2015)
581 # We use ngerman until TL 2015 is out, though.
582 Language german-ch-old
583 GuiName "German (Switzerland, old spelling)"
584 BabelName swissgerman
585 PolyglossiaName german
586 PolyglossiaOpts "spelling=old,babelshorthands=true"
587 # PolyglossiaOpts "variant=swiss,spelling=old,babelshorthands=true"
597 PolyglossiaName greek
600 InternalEncoding true
605 Language polutonikogreek
606 GuiName "Greek (polytonic)"
607 BabelName polutonikogreek
608 PolyglossiaName greek
609 PolyglossiaOpts "variant=polytonic"
612 InternalEncoding true
621 PolyglossiaName hebrew
624 InternalEncoding true
625 # Hebrew babel loads the font encodings
626 # itself in the appropriate order
632 # not supported by babel
635 PolyglossiaName hindi
640 # Currently not supported (file format change!)
641 # "hungarian" is a synonym for the "magyar" babel language option
642 # "hungarian" might be used for special purposes,
643 # see http://www.math.bme.hu/latex/magyar_pre_tug2004.pdf
645 # GuiName "Hungarian"
646 # BabelName hungarian
654 PolyglossiaName icelandic
660 # Interlingua has no official country code because it is an auxiliary
661 # language. We therefore the name of its hunspell dictionary.
663 GuiName "Interlingua"
665 BabelName interlingua
666 PolyglossiaName interlingua
674 PolyglossiaName irish
684 PolyglossiaName italian
690 # japanese must be loaded locally with babel options,
691 # not globally via class options
692 # http://www.lyx.org/trac/ticket/4597#c4
693 # Since japanese does not load fontenc, we set
694 # InternalEncoding to true.
703 InternalEncoding true
708 Language japanese-cjk
709 GuiName "Japanese (CJK)"
715 # not supported by babel
718 PolyglossiaName kannada
723 # not yet supported by polyglossia
724 # not supported by babel
731 \AtBeginDocument{\fontencoding{T2A}\selectfont}
735 # not supported by babel
738 PolyglossiaName khmer
751 # not yet supported by polyglossia
760 # not supported by babel
768 # There is no country code for Latin because it is a dead language.
769 # We therefore the name of its hunspell dictionary.
773 PolyglossiaName latin
778 # latvian must be loaded locally with babel options,
779 # not globally via class options
783 PolyglossiaName latvian
786 # FontEncoding L7x # (required for hyphenation but not set by babel)
791 # lithuanian must be loaded locally with babel options,
792 # not globally via class options
796 PolyglossiaName lithuanian
804 Language lowersorbian
805 GuiName "Lower Sorbian"
806 BabelName lowersorbian
807 PolyglossiaName lsorbian
817 PolyglossiaName magyar
823 # not yet supported by polyglossia
833 # not supported by babel
836 PolyglossiaName marathi
841 # mongolian must be loaded locally with babel options,
842 # not globally via class options
843 # not yet supported by polyglossia
854 GuiName "English (New Zealand)"
856 PolyglossiaName english
857 PolyglossiaOpts "variant=newzealand"
864 GuiName "Norwegian (Bokmaal)"
867 PolyglossiaName norsk
874 GuiName "Norwegian (Nynorsk)"
877 PolyglossiaName nynorsk
883 # not supported by babel
886 PolyglossiaName occitan
892 # Currently not supported (file format change!)
893 # Russian orthography from the Petrine orthographic reforms of
894 # 1708 to the 1917 orthographic reform
895 # Language oldrussian
896 # GuiName "Russian (Petrine orthography)"
897 # PolyglossiaName russian
898 # PolyglossiaOpts spelling=old
899 # LangCode ru_petr1708
903 GuiName "Piedmontese"
905 BabelName piedmontese
906 PolyglossiaName piedmontese
916 PolyglossiaName polish
919 # FontEncoding QX # (required for hyphenation but not set by babel)
927 PolyglossiaName portuges
937 PolyglossiaName romanian
947 PolyglossiaName romansh
957 PolyglossiaName russian
967 PolyglossiaName samin
972 # not supported by babel
975 PolyglossiaName sanskrit
983 PolyglossiaName scottish
993 PolyglossiaName serbian
1001 Language serbian-latin
1002 GuiName "Serbian (Latin)"
1004 PolyglossiaName serbian
1005 PolyglossiaOpts "script=Latin"
1008 LangCode sr_RS-Latin
1015 PolyglossiaName slovak
1024 PolyglossiaName slovenian
1034 PolyglossiaName spanish
1039 \addto\shorthandsspanish{\spanishdeactivate{~<>}}
1040 EndPostBabelPreamble
1043 # there are no spanish shorthands in polyglossia
1044 Language spanish-mexico
1045 GuiName "Spanish (Mexico)"
1047 PolyglossiaName spanish
1052 \addto\shorthandsspanish{\spanishdeactivate{~<>.}}
1053 EndPostBabelPreamble
1060 PolyglossiaName swedish
1066 # not supported by babel
1069 PolyglossiaName syriac
1075 # not supported by babel
1078 PolyglossiaName tamil
1083 # not supported by babel
1086 PolyglossiaName telugu
1094 PolyglossiaName thai
1100 \usepackage{thswitch}
1101 EndPostBabelPreamble
1104 # not supported by babel
1107 PolyglossiaName tibetan
1116 PolyglossiaName turkish
1121 \usepackage{xkeyval}
1122 EndPostBabelPreamble
1125 # turkmen must be loaded locally with babel options,
1126 # not globally via class options
1130 PolyglossiaName turkmen
1141 PolyglossiaName ukrainian
1148 Language uppersorbian
1149 GuiName "Upper Sorbian"
1150 BabelName uppersorbian
1151 PolyglossiaName usorbian
1157 # not supported by babel
1160 PolyglossiaName urdu
1166 # vietnam must be loaded locally with babel options,
1167 # not globally via class options, see
1168 # http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
1170 GuiName "Vietnamese"
1172 PolyglossiaName vietnamese
1183 PolyglossiaName welsh