]> git.lyx.org Git - lyx.git/blob - lib/languages
Buffer::saveCheckSum() can be private.
[lyx.git] / lib / languages
1 ##########################################################################
2 #
3 # Languages supported by LyX.
4 #
5 # Syntax:
6 #
7 # Language <lyxname>
8 #       GuiName            "<Gui Name>"
9 #       BabelName          <babelname>
10 #       PolyglossiaName    <polyglossianame>
11 #       PolyglossiaOpts    "<language-specific options>"
12 #       Encoding           <encoding>
13 #       InternalEncoding   <true|false>
14 #       RTL                <true|false>
15 #       AsBabelOptions     <true|false>
16 #       LangCode           <language_code>
17 #       LangVariety        <language_variety>
18 #       PreBabelPreamble
19 #         <extra latex code inserted before babel>
20 #       EndPreBabelPreamble
21 #       PostBabelPreamble
22 #         <extra latex code inserted after babel>
23 #       EndPostBabelPreamble
24 # End
25 #
26 #
27 # NOTE:
28 #
29 # * Omitted elements will be treated as empty (if string) or "false"
30 #   (if boolean).
31 # * Encoding is not relevant for XeTeX (which is utf8 always), and if
32 #   Document > Settings > Language > Encoding is not set to "Language
33 #   Default"
34 # * InternalEncoding is used to tell LyX that babel internally sets a font
35 #   encoding (such as hebrew to LHE). See bug #5091.
36 # * AsBabelOptions advices LyX to pass the languages locally to babel, not
37 #   globally to the class. Some languages (basically those not directly
38 #   supported by babel) need this.
39 #   FIXME: in this case, we might still need to pass the other languages
40 #          globally, for the use of other packages (such as varioref).
41 # * LangCode is also used for spellchecking and thesaurus, where the
42 #   dictionaries are named accordingly. Thus, check this when intoducing/
43 #   changing language codes (especially aspell, thesaurus).
44 #   TODO: maybe use Best Current Practice (BCP 47) codes for LangCode
45 #         http://www.rfc-editor.org/rfc/bcp/bcp47.txt
46 #         http://www.w3.org/International/articles/language-tags/
47 #         http://www.iana.org/assignments/language-subtag-registry
48 # * LangVariety is used by the aspell spellchecker to differentiate
49 #   dictionaries for different varieties of a given language (e.g. German
50 #   pre-1998 and post-1998 spelling). The aspell dictionaries are named
51 #   language[_REGION][-variety].multi, e.g. de-alt.multi for "German (old
52 #   spelling)" (see http://aspell.net/man-html/Dictionary-Naming.html)
53 #
54 ##########################################################################
55
56 #
57 # LyX-internal languages
58 #
59
60 Language ignore
61         GuiName          "Ignore"
62         BabelName        ignore
63         PolyglossiaName  ignore
64         Encoding         iso8859-1
65         LangCode         ignore
66 End
67
68 Language latex
69         GuiName          "LaTeX"
70         Encoding         iso8859-1
71         LangCode         latex
72 End
73
74 #
75 # Real languages
76 #
77
78 Language afrikaans
79         GuiName          "Afrikaans"
80         BabelName        afrikaans
81         Encoding         iso8859-15
82         LangCode         af_ZA
83 End
84
85 Language albanian
86         GuiName          "Albanian"
87         BabelName        albanian
88         PolyglossiaName  albanian
89         Encoding         iso8859-2
90         LangCode         sq_AL
91 End
92
93 Language american
94         GuiName          "English (USA)"
95         BabelName        american
96         PolyglossiaName  english
97         PolyglossiaOpts  "variant=american"
98         Encoding         iso8859-15
99         LangCode         en_US
100 End
101
102 # Currently not supported (file format change!)
103 # Language ancientgreek
104 #       GuiName          "Greek (ancient)"
105 #       PolyglossiaName  greek
106 #       PolyglossiaOpts  variant=ancient
107 #       LangCode         grc
108 # End
109
110 # FIXME: dummy babel language for arabic_arabtex to be able
111 # to switch the language the way of the ArabTeX-package
112 Language arabic_arabtex
113         GuiName          "Arabic (ArabTeX)"
114         BabelName        arabtex
115         Encoding         cp1256
116         RTL              true
117         LangCode         ar_SA
118 End
119
120 # polyglossia uses "Arabic" for the lang environment
121 Language arabic_arabi
122         GuiName          "Arabic (Arabi)"
123         BabelName        arabic
124         PolyglossiaName  arabic
125         Encoding         cp1256
126         RTL              true
127         LangCode         ar_SA
128 End
129
130 Language armenian
131         GuiName          "Armenian"
132         PolyglossiaName  armenian
133         Encoding         armscii8
134         LangCode         hy_AM
135 End
136
137 Language austrian
138         GuiName          "German (Austria, old spelling)"
139         BabelName        austrian
140         Encoding         iso8859-15
141         LangCode         de_AT
142 End
143
144 Language naustrian
145         GuiName          "German (Austria)"
146         BabelName        naustrian
147         Encoding         iso8859-15
148         LangCode         de_AT
149 End
150
151 Language bahasa
152         GuiName          "Indonesian"
153         BabelName        bahasa
154         PolyglossiaName  bahasai
155         Encoding         iso8859-15
156         LangCode         id_ID
157 End
158
159 Language bahasam
160         GuiName          "Malay"
161         BabelName        bahasam
162         PolyglossiaName  bahasam
163         Encoding         iso8859-15
164         LangCode         ms_MY
165 End
166
167 Language basque
168         GuiName          "Basque"
169         BabelName        basque
170         PolyglossiaName  basque
171         Encoding         iso8859-15
172         LangCode         eu_ES
173 End
174
175 Language belarusian
176         GuiName          "Belarusian"
177         BabelName        belarusian
178         Encoding         cp1251
179         LangCode         be_BY
180 End
181
182 Language brazilian
183         GuiName          "Portuguese (Brazil)"
184         BabelName        brazil
185         PolyglossiaName  brazil
186         Encoding         iso8859-15
187         LangCode         pt_BR
188 End
189
190 Language breton
191         GuiName          "Breton"
192         BabelName        breton
193         PolyglossiaName  breton
194         Encoding         iso8859-15
195         LangCode         br_FR
196 End
197
198 Language british
199         GuiName          "English (UK)"
200         BabelName        british
201         PolyglossiaName  english
202         PolyglossiaOpts  "variant=british"
203         Encoding         iso8859-15
204         LangCode         en_GB
205 End
206
207 Language bulgarian
208         GuiName          "Bulgarian"
209         BabelName        bulgarian
210         PolyglossiaName  bulgarian
211         Encoding         cp1251
212         LangCode         bg_BG
213 End
214
215 # not yet supported by polyglossia
216 Language canadian
217         GuiName          "English (Canada)"
218         BabelName        canadian
219 #       PolyglossiaName  english
220 #       PolyglossiaOpts  "variant=canadian"
221         Encoding         iso8859-15
222         LangCode         en_CA
223 End
224
225 # not yet supported by polyglossia
226 Language canadien
227         GuiName          "French (Canada)"
228         BabelName        canadien
229 #       PolyglossiaName  french
230 #       PolyglossiaOpts  "variant=canadien"
231         Encoding         iso8859-15
232         LangCode         fr_CA
233 End
234
235 Language catalan
236         GuiName          "Catalan"
237         BabelName        catalan
238         PolyglossiaName  catalan
239         PolyglossiaOpts  "babelshorthands=true"
240         Encoding         iso8859-15
241         LangCode         ca_ES
242 End
243
244 # uses CJK package
245 Language chinese-simplified
246         GuiName          "Chinese (simplified)"
247         Encoding         euc-cn
248         LangCode         zh_CN
249 End
250
251 # uses CJK package
252 Language chinese-traditional
253         GuiName         "Chinese (traditional)"
254         Encoding        utf8-cjk
255         LangCode        zh_CN
256 End
257
258 # Currently not supported (file format change!)
259 # Language coptic
260 #       GuiName          "Coptic"
261 #       PolyglossiaName  coptic
262 #       LangCode         cop
263 # End
264
265 Language croatian
266         GuiName          "Croatian"
267         BabelName        croatian
268         PolyglossiaName  croatian
269         Encoding         iso8859-2
270         LangCode         hr_HR
271 End
272
273 Language czech
274         GuiName          "Czech"
275         BabelName        czech
276         PolyglossiaName  czech
277         Encoding         iso8859-2
278         LangCode         cs_CZ
279 End
280
281 Language danish
282         GuiName          "Danish"
283         BabelName        danish
284         PolyglossiaName  danish
285         Encoding         iso8859-15
286         LangCode         da_DK
287 End
288
289 # Currently not supported (file format change!)
290 # Language divehi
291 #       GuiName          "Divehi (Maldivian)"
292 #       PolyglossiaName  divehi
293 #       LangCode         dv
294 # End
295
296 Language dutch
297         GuiName          "Dutch"
298         BabelName        dutch
299         PolyglossiaName  dutch
300         PolyglossiaOpts  "babelshorthands=true"
301         Encoding         iso8859-15
302         LangCode         nl_NL
303 End
304
305 Language english
306         GuiName          "English"
307         BabelName        english
308         PolyglossiaName  english
309         Encoding         iso8859-15
310         LangCode         en_US
311 End
312
313 # Esperanto has no country code because it is an auxiliary language
314 Language esperanto
315         GuiName          "Esperanto"
316         BabelName        esperanto
317         PolyglossiaName  esperanto
318         Encoding         iso8859-3
319         LangCode         eo
320 End
321
322 Language estonian
323         GuiName          "Estonian"
324         BabelName        estonian
325         PolyglossiaName  estonian
326         Encoding         iso8859-15
327         LangCode         et_EE
328 End
329
330 # the preamble definitions are only used due to bugs in the
331 # arabi-package -- remove them if they become unnecessary!
332 Language farsi
333         GuiName          "Farsi"
334         BabelName        farsi
335         PolyglossiaName  farsi
336         Encoding         utf8
337         RTL              true
338         LangCode         fa_IR
339         PostBabelPreamble
340         \DeclareTextSymbol{\guillemotright}{LFE}{62}
341         \DeclareTextSymbol{\guillemotleft}{LFE}{60}
342         EndPostBabelPreamble
343 End
344
345 Language finnish
346         GuiName          "Finnish"
347         BabelName        finnish
348         PolyglossiaName  finnish
349         Encoding         iso8859-15
350         LangCode         fi_FI
351 End
352
353 # We redefine \og and \fg (guillemets) for older french language definitions
354 Language french
355         GuiName          "French"
356         BabelName        french
357         PolyglossiaName  french
358         Encoding         iso8859-15
359         LangCode         fr_FR
360         PostBabelPreamble
361         \addto\extrasfrench{%
362            \providecommand{\og}{\leavevmode\flqq~}
363            \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}
364         }
365         EndPostBabelPreamble
366 End
367
368 Language galician
369         GuiName          "Galician"
370         BabelName        galician
371         PolyglossiaName  galician
372         Encoding         iso8859-15
373         LangCode         gl_ES
374 End
375
376 # german does not use a country code (due to the variety)
377 Language german
378         GuiName          "German (old spelling)"
379         BabelName        german
380         PolyglossiaName  german
381         PolyglossiaOpts  "spelling=old,babelshorthands=true"
382         Encoding         iso8859-15
383         LangCode         de
384         LangVariety      alt
385 End
386
387 Language ngerman
388         GuiName          "German"
389         BabelName        ngerman
390         PolyglossiaName  german
391         PolyglossiaOpts  "babelshorthands=true"
392         Encoding         iso8859-15
393         LangCode         de_DE
394 End
395
396 # Swiss German is not supported by babel and polyglossia yet
397 # We use ngerman for now (spellchecking is supported though!)
398 Language german-ch
399         GuiName          "German (Switzerland)"
400         BabelName        ngerman
401         PolyglossiaName  german
402         PolyglossiaOpts  "babelshorthands=true"
403         Encoding         iso8859-15
404         LangCode         de_CH
405 End
406
407 Language greek
408         GuiName           "Greek"
409         BabelName         greek
410         PolyglossiaName   greek
411         Encoding          iso8859-7
412         InternalEncoding  true
413         LangCode          el_GR
414 End
415
416 Language polutonikogreek
417         GuiName           "Greek (polytonic)"
418         BabelName         polutonikogreek
419         PolyglossiaName   greek
420         PolyglossiaOpts   "variant=polytonic"
421         Encoding          iso8859-7
422         InternalEncoding  true
423         LangCode          el_GR
424 End
425
426 Language hebrew
427         GuiName           "Hebrew"
428         BabelName         hebrew
429         PolyglossiaName   hebrew
430         Encoding          cp1255
431         InternalEncoding  true
432         RTL               true
433         LangCode          he_IL
434 End
435
436 # Currently not supported (file format change!)
437 # Language hindi
438 #       GuiName          "Hindi"
439 #       PolyglossiaName  hindi
440 #       LangCode         hi
441 # End
442
443 # Currently not supported (file format change!)
444 # "hungarian" is a synonym for the "magyar" babel language option
445 # "hungarian" might be used for special purposes,
446 # see http://www.math.bme.hu/latex/magyar_pre_tug2004.pdf
447 #Language hungarian
448 #       GuiName         "Hungarian"
449 #       BabelName       hungarian
450 #       Encoding        iso8859-2
451 #       LangCode        hu_HU
452 #End
453
454 Language icelandic
455         GuiName          "Icelandic"
456         BabelName        icelandic
457         PolyglossiaName  icelandic
458         Encoding         iso8859-15
459         LangCode         is_IS
460 End
461
462 # Interlingua has no country code because it is an auxiliary language
463 Language interlingua
464         GuiName          "Interlingua"
465         BabelName        interlingua
466         PolyglossiaName  interlingua
467         Encoding         iso8859-15
468         LangCode         ia
469 End
470
471 Language irish
472         GuiName          "Irish"
473         BabelName        irish
474         PolyglossiaName  irish
475         Encoding         iso8859-15
476         LangCode         ga_IE
477 End
478
479 Language italian
480         GuiName          "Italian"
481         BabelName        italian
482         PolyglossiaName  italian
483         Encoding         iso8859-15
484         LangCode         it_IT
485 End
486
487 # japanese must be loaded locally with babel options,
488 # not globally via class options
489 # http://www.lyx.org/trac/ticket/4597#c4
490 Language japanese
491         GuiName          "Japanese"
492         BabelName        japanese
493         Encoding         jis-plain
494         LangCode         ja_JP
495         AsBabelOptions   true
496 End
497
498 # uses CJK package
499 Language japanese-cjk
500         GuiName         "Japanese (CJK)"
501         Encoding        euc-jp
502         LangCode        ja_JP
503 End
504
505 Language kazakh
506         GuiName         "Kazakh"
507         BabelName       kazakh
508         Encoding        pt154
509         LangCode        kk_KZ
510 End
511
512 # there is no country code for Korean because ko_KR is the same as ko_KI
513 Language korean
514         GuiName         "Korean"
515         Encoding        euc-kr
516         LangCode        ko
517 End
518
519 # Currently not supported (file format change!)
520 # Language lao
521 #       GuiName          "Lao"
522 #       PolyglossiaName  lao
523 #       LangCode         lo
524 # End
525
526 # there is no country code for Latin because it is a dead language
527 Language latin
528         GuiName          "Latin"
529         BabelName        latin
530         PolyglossiaName  latin
531         Encoding         iso8859-15
532         LangCode         la
533 End
534
535 # latvian must be loaded locally with babel options,
536 # not globally via class options
537 Language latvian
538         GuiName          "Latvian"
539         BabelName        latvian
540         PolyglossiaName  latvian
541         Encoding         iso8859-4
542         LangCode         lv_LV
543         AsBabelOptions   true
544 End
545
546 # lithuanian must be loaded locally with babel options,
547 # not globally via class options
548 Language lithuanian
549         GuiName          "Lithuanian"
550         BabelName        lithuanian
551         PolyglossiaName  lithuanian
552         Encoding         iso8859-13
553         LangCode         lt_LT
554         AsBabelOptions   true
555 End
556
557 Language lowersorbian
558         GuiName          "Lower Sorbian"
559         BabelName        lowersorbian
560         PolyglossiaName  lsorbian
561         Encoding         iso8859-2
562         LangCode         dsb_DE
563 End
564
565 Language magyar
566         GuiName          "Hungarian"
567         BabelName        magyar
568         PolyglossiaName  magyar
569         Encoding         iso8859-2
570         LangCode         hu_HU
571 End
572
573 # Currently not supported (file format change!)
574 # Language marathi
575 #       GuiName          "Marathi"
576 #       PolyglossiaName  marathi
577 #       LangCode         mr
578 # End
579
580 # mongolian must be loaded locally with babel options,
581 # not globally via class options
582 Language mongolian
583         GuiName          "Mongolian"
584         BabelName        mongolian
585         Encoding         utf8
586         LangCode         mn_MN
587         AsBabelOptions   true
588 End
589
590 Language norsk
591         GuiName          "Norsk"
592         BabelName        norsk
593         PolyglossiaName  norsk
594         Encoding         iso8859-15
595         LangCode         nb_NO
596 End
597
598 Language nynorsk
599         GuiName          "Nynorsk"
600         BabelName        nynorsk
601         PolyglossiaName  nynorsk
602         Encoding         iso8859-15
603         LangCode         nn_NO
604 End
605
606 # Currently not supported (file format change!)
607 # Language occitan
608 #       GuiName          "Occitan"
609 #       PolyglossiaName  occitan
610 #       LangCode         oc
611 # End
612
613 # Currently not supported (file format change!)
614 # Russian orthography from the Petrine orthographic reforms of
615 # 1708 to the 1917 orthographic reform
616 # Language oldrussian
617 #       GuiName          "Russian (Petrine orthography)"
618 #       PolyglossiaName  russian
619 #       PolyglossiaOpts  spelling=old
620 #       LangCode         ru_petr1708
621 # End
622
623 Language polish
624         GuiName          "Polish"
625         BabelName        polish
626         PolyglossiaName  polish
627         Encoding         iso8859-2
628         LangCode         pl_PL
629 End
630
631 Language portuguese
632         GuiName          "Portuguese"
633         BabelName        portuges
634         PolyglossiaName  portuges
635         Encoding         iso8859-15
636         LangCode         pt_PT
637 End
638
639 Language romanian
640         GuiName          "Romanian"
641         BabelName        romanian
642         PolyglossiaName  romanian
643         Encoding         iso8859-2
644         LangCode         ro_RO
645 End
646
647 Language russian
648         GuiName          "Russian"
649         BabelName        russian
650         PolyglossiaName  russian
651         Encoding         koi8
652         LangCode         ru_RU
653 End
654
655 Language samin
656         GuiName          "North Sami"
657         BabelName        samin
658         PolyglossiaName  samin
659         Encoding         iso8859-15
660         LangCode         se_NO
661 End
662
663 # Currently not supported (file format change!)
664 # Language sanskrit
665 #       GuiName          "Sanskrit"
666 #       PolyglossiaName  sanskrit
667 #       LangCode         sa
668 # End
669
670 Language scottish
671         GuiName          "Scottish"
672         BabelName        scottish
673         PolyglossiaName  scottish
674         Encoding         iso8859-15
675         LangCode         gd_GB
676 End
677
678 Language serbian
679         GuiName          "Serbian"
680         BabelName        serbian
681         PolyglossiaName  serbian
682         Encoding         iso8859-5
683         LangCode         sr_RS
684 End
685
686 Language serbian-latin
687         GuiName          "Serbian (Latin)"
688         BabelName        serbian
689         PolyglossiaName  serbian
690         PolyglossiaOpts  "script=latin"
691         Encoding         iso8859-2
692         LangCode         sr_RS
693 End
694
695 Language slovak
696         GuiName          "Slovak"
697         BabelName        slovak
698         PolyglossiaName  slovak
699         Encoding         iso8859-2
700         LangCode         sk_SK
701 End
702
703 Language slovene
704         GuiName          "Slovene"
705         BabelName        slovene
706         PolyglossiaName  slovenian
707         Encoding         iso8859-2
708         LangCode         sl_SI
709 End
710
711 Language spanish
712         GuiName          "Spanish"
713         BabelName        spanish
714         PolyglossiaName  spanish
715         Encoding         iso8859-15
716         LangCode         es_ES
717         PostBabelPreamble
718         \addto\shorthandsspanish{\spanishdeactivate{~<>}}
719         EndPostBabelPreamble
720 End
721
722 # there are no spanish shorthands in polyglossia
723 Language spanish-mexico
724         GuiName          "Spanish (Mexico)"
725         BabelName        spanish
726         PolyglossiaName  spanish
727         Encoding         iso8859-15
728         LangCode         es_MX
729         PostBabelPreamble
730         \addto\shorthandsspanish{\spanishdeactivate{~<>.}}
731         EndPostBabelPreamble
732 End
733
734 Language swedish
735         GuiName          "Swedish"
736         BabelName        swedish
737         PolyglossiaName  swedish
738         Encoding         iso8859-15
739         LangCode         sv_SE
740 End
741
742 # Currently not supported (file format change!)
743 # Language syriac
744 #       GuiName          "Syriac"
745 #       PolyglossiaName  syriac
746 #       LangCode         syr
747 # End
748
749 # Currently not supported (file format change!)
750 # Language tamil
751 #       GuiName          "Tamil"
752 #       PolyglossiaName  tamil
753 #       LangCode         Taml
754 # End
755
756 # Currently not supported (file format change!)
757 # Language telugu
758 #       GuiName          "Telugu"
759 #       PolyglossiaName  telugu
760 #       LangCode         te
761 # End
762
763 Language thai
764         GuiName          "Thai"
765         BabelName        thai
766         PolyglossiaName  thai
767         Encoding         tis620-0
768         LangCode         th_TH
769         PostBabelPreamble
770         \usepackage{thswitch}
771         EndPostBabelPreamble
772 End
773
774 Language turkish
775         GuiName          "Turkish"
776         BabelName        turkish
777         PolyglossiaName  turkish
778         Encoding         iso8859-9
779         LangCode         tr_TR
780 End
781
782 # turkmen must be loaded locally with babel options,
783 # not globally via class options
784 Language turkmen
785         GuiName          "Turkmen"
786         BabelName        turkmen
787         PolyglossiaName  turkmen
788         Encoding         utf8
789         LangCode         tk_TM
790         AsBabelOptions   true
791 End
792
793 Language ukrainian
794         GuiName          "Ukrainian"
795         BabelName        ukrainian
796         PolyglossiaName  ukrainian
797         Encoding         koi8-u
798         LangCode         uk_UA
799 End
800
801 Language uppersorbian
802         GuiName          "Upper Sorbian"
803         BabelName        uppersorbian
804         PolyglossiaName  usorbian
805         Encoding         iso8859-2
806         LangCode         hsb_DE
807 End
808
809 # Currently not supported (file format change!)
810 # Language urdu
811 #       GuiName          "Urdu"
812 #       PolyglossiaName  urdu
813 #       LangCode         ur
814 # End
815
816 # vietnam must be loaded locally with babel options,
817 # not globally via class options, see
818 # http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
819 Language vietnamese
820         GuiName          "Vietnamese"
821         BabelName        vietnam
822         PolyglossiaName  vietnamese
823         Encoding         utf8
824         LangCode         vi_VN
825         AsBabelOptions   true
826 End
827
828 Language welsh
829         GuiName          "Welsh"
830         BabelName        welsh
831         PolyglossiaName  welsh
832         Encoding         iso8859-15
833         LangCode         cy_GB
834 End