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