Skip to content

Commit

Permalink
Merge pull request #79 from dsimon-dev/master
Browse files Browse the repository at this point in the history
Add german localization
  • Loading branch information
Daniel-Ioannou authored Apr 17, 2022
2 parents ed9df27 + ba77b1d commit 86db86d
Show file tree
Hide file tree
Showing 3 changed files with 258 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/country_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';

import 'res/strings/ar.dart';
import 'res/strings/cn.dart';
import 'res/strings/de.dart';
import 'res/strings/en.dart';
import 'res/strings/es.dart';
import 'res/strings/et.dart';
Expand Down Expand Up @@ -90,6 +91,8 @@ class CountryLocalizations {
return hr[countryCode];
case 'fr':
return fr[countryCode];
case 'de':
return de[countryCode];
case 'en':
default:
return en[countryCode];
Expand Down Expand Up @@ -122,6 +125,7 @@ class _CountryLocalizationsDelegate
'tr',
'hr',
'fr',
'de',
].contains(locale.languageCode);
}

Expand Down
4 changes: 4 additions & 0 deletions lib/src/country_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'res/country_codes.dart';
import 'res/strings/ar.dart';
import 'res/strings/cn.dart';
import 'res/strings/de.dart';
import 'res/strings/en.dart';
import 'res/strings/es.dart';
import 'res/strings/et.dart';
Expand Down Expand Up @@ -214,6 +215,8 @@ class CountryParser {
return np;
case 'fr':
return fr;
case 'de':
return de;
case 'en':
default:
return en;
Expand Down Expand Up @@ -244,6 +247,7 @@ class CountryParser {
const Locale('uk'),
const Locale('tr'),
const Locale('hr'),
const Locale('de'),
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'),
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'),
]..removeWhere((Locale l) => exclude.contains(l));
Expand Down
250 changes: 250 additions & 0 deletions lib/src/res/strings/de.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
Map<String, String> de = {
"AF": "Afghanistan",
"AX": "Åland",
"AL": "Albanien",
"DZ": "Algerien",
"AS": "Amerikanisch-Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AG": "Antigua und Barbuda",
"AR": "Argentinien",
"AM": "Armenien",
"AW": "Aruba",
"AC": "Ascension",
"AU": "Australien",
"AT": "Österreich",
"AZ": "Aserbaidschan",
"BS": "Bahamas",
"BH": "Bahrain",
"BD": "Bangladesch",
"BB": "Barbados",
"BY": "Belarus",
"BE": "Belgien",
"BZ": "Belize",
"BJ": "Benin",
"BM": "Bermuda",
"BT": "Bhutan",
"BO": "Bolivien",
"BA": "Bosnien und Herzegowina",
"BW": "Botswana",
"BR": "Brasilien",
"IO": "Britisches Territorium im Indischen Ozean",
"VG": "Britische Jungferninseln",
"BN": "Brunei",
"BG": "Bulgarien",
"BF": "Burkina Faso",
"BI": "Burundi",
"KH": "Kambodscha",
"CM": "Kamerun",
"CA": "Kanada",
"CV": "Kap Verde",
"BQ": "Karibische Niederlande",
"KY": "Kaimaninseln",
"CF": "Zentralafrikanische Republik",
"TD": "Tschad",
"CL": "Chile",
"CN": "China",
"CX": "Weihnachtsinsel",
"CC": "Kokosinseln",
"CO": "Kolumbien",
"KM": "Komoren",
"CD": "Demokratische Republik Kongo",
"CG": "Republik Kongo",
"CK": "Cookinseln",
"CR": "Costa Rica",
"CI": "Elfenbeinküste",
"HR": "Kroatien",
"CU": "Kuba",
"CW": "Curaçao",
"CY": "Zypern",
"CZ": "Tschechien",
"DK": "Dänemark",
"DJ": "Dschibuti",
"DM": "Dominica",
"DO": "Dominikanische Republik",
"TL": "Osttimor",
"EC": "Ecuador",
"EG": "Ägypten",
"SV": "El Salvador",
"GQ": "Äquatorialguinea",
"ER": "Eritrea",
"EE": "Estland",
"ET": "Äthiopien",
"FK": "Falklandinseln",
"FO": "Färöer",
"FJ": "Fidschi",
"FI": "Finnland",
"FR": "Frankreich",
"GF": "Französisch-Guayana",
"PF": "Französisch-Polynesien",
"GA": "Gabun",
"GM": "Gambia",
"GE": "Georgien",
"DE": "Deutschland",
"GH": "Ghana",
"GI": "Gibraltar",
"GR": "Griechenland",
"GL": "Grönland",
"GD": "Grenada",
"GP": "Guadeloupe",
"GU": "Guam",
"GT": "Guatemala",
"GG": "Guernsey",
"GN": "Guinea",
"GW": "Guinea-Bissau",
"GY": "Guyana",
"HT": "Haiti",
"HM": "Heard und McDonaldinseln",
"HN": "Honduras",
"HK": "Hongkong",
"HU": "Ungarn",
"IS": "Island",
"IN": "Indien",
"ID": "Indonesien",
"IR": "Iran",
"IQ": "Irak",
"IE": "Irland",
"IM": "Isle of Man",
"IL": "Israel",
"IT": "Italien",
"JM": "Jamaika",
"JP": "Japan",
"JE": "Jersey",
"JO": "Jordanien",
"KZ": "Kasachstan",
"KE": "Kenia",
"KI": "Kiribati",
"XK": "Kosovo",
"KW": "Kuwait",
"KG": "Kirgisistan",
"LA": "Laos",
"LV": "Lettland",
"LB": "Libanon",
"LS": "Lesotho",
"LR": "Liberia",
"LY": "Libyen",
"LI": "Liechtenstein",
"LT": "Litauen",
"LU": "Luxemburg",
"MO": "Macau",
"MK": "Nordmazedonien",
"MG": "Madagaskar",
"MW": "Malawi",
"MY": "Malaysia",
"MV": "Malediven",
"ML": "Mali",
"MT": "Malta",
"MH": "Marshallinseln",
"MQ": "Martinique",
"MR": "Mauretanien",
"MU": "Mauritius",
"YT": "Mayotte",
"MX": "Mexiko",
"FM": "Mikronesien",
"MD": "Moldau",
"MC": "Monaco",
"MN": "Mongolei",
"ME": "Montenegro",
"MS": "Montserrat",
"MA": "Marokko",
"MZ": "Mosambik",
"MM": "Myanmar",
"NA": "Namibia",
"NR": "Nauru",
"NP": "Nepal",
"NL": "Niederlande",
"NC": "Neukaledonien",
"NZ": "Neuseeland",
"NI": "Nicaragua",
"NE": "Niger",
"NG": "Nigeria",
"NU": "Niue",
"NF": "Norfolkinsel",
"KP": "Nordkorea",
"MP": "Nördliche Marianen",
"NO": "Norwegen",
"OM": "Oman",
"PK": "Pakistan",
"PW": "Palau",
"PS": "Palästina",
"PA": "Panama",
"PG": "Papua-Neuguinea",
"PY": "Paraguay",
"PE": "Peru",
"PH": "Philippinen",
"PL": "Polen",
"PT": "Portugal",
"PR": "Puerto Rico",
"QA": "Katar",
"RE": "Réunion",
"RO": "Rumänien",
"RU": "Russland",
"RW": "Ruanda",
"BL": "Saint-Barthélemy",
"SH": "St. Helena, Ascension und Tristan da Cunha",
"KN": "St. Kitts und Nevis",
"LC": "St. Lucia",
"MF": "Saint-Martin",
"PM": "Saint-Pierre und Miquelon",
"VC": "St. Vincent und die Grenadinen",
"WS": "Samoa",
"SM": "San Marino",
"ST": "São Tomé und Príncipe",
"SA": "Saudi-Arabien",
"SN": "Senegal",
"RS": "Serbien",
"SC": "Seychellen",
"SL": "Sierra Leone",
"SG": "Singapur",
"SX": "Sint Maarten",
"SK": "Slowakei",
"SI": "Slowenien",
"SB": "Salomonen",
"SO": "Somalia",
"ZA": "Südafrika",
"GS": "Südgeorgien und die Südlichen Sandwichinseln",
"KR": "Südkorea",
"SS": "Südsudan",
"ES": "Spanien",
"LK": "Sri Lanka",
"SD": "Sudan",
"SR": "Suriname",
"SJ": "Spitzbergen und Jan Mayen",
"SZ": "Eswatini",
"SE": "Schweden",
"CH": "Schweiz",
"SY": "Syrien",
"TW": "Taiwan",
"TJ": "Tadschikistan",
"TZ": "Tansania",
"TH": "Thailand",
"TG": "Togo",
"TK": "Tokelau",
"TO": "Tonga",
"TT": "Trinidad und Tobago",
"TN": "Tunesien",
"TR": "Türkei",
"TM": "Turkmenistan",
"TC": "Turks- und Caicosinseln",
"TV": "Tuvalu",
"VI": "Amerikanische Jungferninseln",
"UG": "Uganda",
"UA": "Ukraine",
"AE": "Vereinigte Arabische Emirate",
"GB": "Vereinigtes Königreich",
"US": "Vereinigte Staaten",
"UY": "Uruguay",
"UZ": "Usbekistan",
"VU": "Vanuatu",
"VA": "Vatikanstadt",
"VE": "Venezuela",
"VN": "Vietnam",
"WF": "Wallis und Futuna",
"WW": "Weltweit",
"EH": "Westsahara",
"YE": "Jemen",
"ZM": "Sambia",
"ZW": "Simbabwe",
"search": "Suchen",
};

0 comments on commit 86db86d

Please sign in to comment.