Skip to content

Commit c305541

Browse files
Markus1812schneidermic0albertmink
authored
updated documentation for the language field (#611)
Co-authored-by: Michael Schneider <[email protected]> Co-authored-by: Albert Mink <[email protected]>
1 parent 184ae10 commit c305541

File tree

3 files changed

+121
-6
lines changed

3 files changed

+121
-6
lines changed

docs/json.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ i | integer | `"minimum": -2147483648, "maximum": 2147483647`
9292
n | string | `"maxLength": <length of character field>, "pattern": "^[0-9]+$"`
9393
p | number | `"minimum": <minimum value>, "maximum": <maximum value>
9494
abap_bool | boolean |
95-
sy-langu | string | `"minLength": 2, "maxLength": 2, "pattern": "^[a-z]+$"`
95+
sy-langu | string | `"minLength": 2`
9696
table | array | if the table has unique keys, `"uniqueItems": true` is added to the schema; hashed tables are not supported
9797

9898
### Title
@@ -306,9 +306,7 @@ This leads to the following generated JSON schema:
306306
"title": "Original Language",
307307
"description": "Original language of the ABAP object",
308308
"type": "string",
309-
"minLength": 2,
310-
"maxLength": 2,
311-
"pattern": "^[a-z]+$"
309+
"minLength": 2
312310
},
313311
"abapLanguageVersion": {
314312
"title": "ABAP Language Version (source code object)",
@@ -369,7 +367,8 @@ The field `description` contains the description of the object.
369367

370368
The field `originalLanguage` stores the information about the original language of the object.
371369

372-
The original language is specified with [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes.
370+
The original language is specified with [BCP47](https://en.wikipedia.org/wiki/IETF_language_tag) language tags, which combine [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes with subtags for language variations.
371+
A full list of SAP supported BCP47 language tags can be found [here](./languages.md).
373372

374373
All translatable texts in the object shall be maintained in their original language.
375374
Translations of the texts shall be stored in separate files.

docs/languages.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
## Supported languages for the Original Language field
2+
3+
The following table shows all currently supported languages (BCP47 format) for language fields (like the field `originalLanguage` in the header) and their corresponding SAP2 language code.
4+
5+
The list of supported languages is based on [SAP Note 73606 - Supported Languages and Code Pages](https://launchpad.support.sap.com/#/notes/73606).
6+
7+
| Language | BCP47 | SAP2 |
8+
|-----------------------------|---------|------|
9+
| Afrikaans | af | AF |
10+
| Albanian | sq | SQ |
11+
| Basque | eu | EU |
12+
| Bosnian | bs | BS |
13+
| Bulgarian | bg | BG |
14+
| Catalan | ca | CA |
15+
| Chinese China | zh | ZH |
16+
| Chinese Singapore | zh-SG | 3C |
17+
| Chinese Taiwan | zh-Hant | ZF |
18+
| Croatian | hr | HR |
19+
| Czech | cs | CS |
20+
| Danish | da | DA |
21+
| Dutch Netherlands | nl | NL |
22+
| Dutch Belgium | nl-BE | 1D |
23+
| English United States | en | EN |
24+
| English United Kingdom | en-GB | 6N |
25+
| English Australia | en-AU | 1E |
26+
| English Belize | en-BZ | 2E |
27+
| English Canada | en-CA | 3E |
28+
| English Hong Kong SAR | en-HK | 5E |
29+
| English India | en-IN | 6E |
30+
| English Indonesia | en-ID | 7E |
31+
| English Ireland | en-IE | 8E |
32+
| English Jamaica | en-JM | 9E |
33+
| English Malaysia | en-MY | 0E |
34+
| English New Zealand | en-NZ | 1N |
35+
| English Philippines | en-PH | 2N |
36+
| English Singapore | en-SG | 3N |
37+
| English South Africa | en-ZA | 4N |
38+
| English Trinidad and Tobago | en-TT | 5N |
39+
| English Zimbabwe | en-ZW | 7N |
40+
| Estonian | et | ET |
41+
| Finnish | fi | FI |
42+
| French France | fr | FR |
43+
| French Belgium | fr-BE | 1F |
44+
| French Cameroon | fr-CM | 2F |
45+
| French Canada | fr-CA | 3F |
46+
| French Congo DRC | fr-CG | 4F |
47+
| French Cote d'Ivoire | fr-CI | 5F |
48+
| French Haiti | fr-HT | 6F |
49+
| French Luxembourg | fr-LU | 7F |
50+
| French Mali | fr-ML | 8F |
51+
| French Monaco | fr-MC | 9F |
52+
| French Morocco | fr-MA | 1H |
53+
| French Reunion | fr-RE | 2H |
54+
| French Senegal | fr-SN | 3H |
55+
| French Switzerland | fr-CH | 4H |
56+
| Gaelic | gd | GD |
57+
| Gallegan | gl | GL |
58+
| German Germany | de | DE |
59+
| German Austria | de-AT | 1G |
60+
| German Liechtenstein | de-LI | 2G |
61+
| German Luxembourg | de-LU | 3G |
62+
| German Switzerland | de-CH | 4G |
63+
| Greek, Modern | el | EL |
64+
| Hebrew | he | HE |
65+
| Hungarian | hu | HU |
66+
| Icelandic | is | IS |
67+
| Indonesian | id | ID |
68+
| Irish | ga | GA |
69+
| Italian Italy | it | IT |
70+
| Italian Switzerland | it-CH | 1I |
71+
| Japanese | ja | JA |
72+
| Korean South Korea | ko | KO |
73+
| Latvian | lv | LV |
74+
| Lithuanian | lt | LT |
75+
| Malay Malaysia | ms | MS |
76+
| Malay Brunei Darussalam | ms-BN | 1M |
77+
| Norwegian | no | NO |
78+
| Polish | pl | PL |
79+
| Portuguese Brazil | pt | PT |
80+
| Rhaeto-Romance | rm | RM |
81+
| Romanian Romania | ro | RO |
82+
| Russian Russia | ru | RU |
83+
| Serbian, Cyrillic | sr-Cyrl | SR |
84+
| Serbian, Latin | sr-Latn | SH |
85+
| Slovak | sk | SK |
86+
| Slovenian | sl | SL |
87+
| Sorbian | wen | SB |
88+
| Lower Sorbain | dsb | DS |
89+
| Upper Sorbian | hsb | HS |
90+
| Spanish Spain | es | ES |
91+
| Spanish Argentina | es-AR | 1S |
92+
| Spanish Bolivia | es-BO | 2S |
93+
| Spanish Chile | es-CL | 3S |
94+
| Spanish Columbia | es-CO | 0S |
95+
| Spanish Costa Rica | es-CR | 4S |
96+
| Spanish Dominican Republic | es-DO | 5S |
97+
| Spanish Ecuador | es-EC | 6S |
98+
| Spanish El Salvador | es-SV | 7S |
99+
| Spanish Guatemala | es-GT | 8S |
100+
| Spanish Honduras | es-HN | 9S |
101+
| Spanish Mexico | es-MX | 1X |
102+
| Spanish Nicaragua | es-NI | 2X |
103+
| Spanish Panama | es-PA | 3X |
104+
| Spanish Paraguay | es-PY | 4X |
105+
| Spanish Peru | es-PE | 5X |
106+
| Spanish Puerto Rico | es-PR | 6X |
107+
| Spanish Uruguay | es-UY | 7X |
108+
| Spanish Venezuela | es-VE | 8X |
109+
| Swahili | sw | SW |
110+
| Swedish | sv | SV |
111+
| Tagalog | tl | TL |
112+
| Thai | th | TH |
113+
| Turkish | tr | TR |
114+
| Ukrainian | uk | UK |
115+
| Vietnamese | vi | VI |
116+
| Walloon | wa | WA |

docs/specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ cl_oo_clif_source.clas.texts.en.properties
4444
```
4545

4646
### Language
47-
The language of the texts is encoded by the element `language` following [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
47+
The language of the texts is encoded by the element `language` following [BCP47](https://en.wikipedia.org/wiki/IETF_language_tag).
4848
```
4949
cl_oo_clif_source.clas.texts.en.properties
5050
```

0 commit comments

Comments
 (0)