From ba77b1d5d79e22dffe0fca4b1960d447919142ab Mon Sep 17 00:00:00 2001 From: Dominik Simon Date: Sun, 17 Apr 2022 09:42:54 +0200 Subject: [PATCH] add german localization --- lib/src/country_localizations.dart | 4 + lib/src/country_parser.dart | 4 + lib/src/res/strings/de.dart | 250 +++++++++++++++++++++++++++++ 3 files changed, 258 insertions(+) create mode 100644 lib/src/res/strings/de.dart diff --git a/lib/src/country_localizations.dart b/lib/src/country_localizations.dart index 0ea5205..4719f33 100644 --- a/lib/src/country_localizations.dart +++ b/lib/src/country_localizations.dart @@ -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'; @@ -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]; @@ -122,6 +125,7 @@ class _CountryLocalizationsDelegate 'tr', 'hr', 'fr', + 'de', ].contains(locale.languageCode); } diff --git a/lib/src/country_parser.dart b/lib/src/country_parser.dart index 1760c2e..47e32b3 100644 --- a/lib/src/country_parser.dart +++ b/lib/src/country_parser.dart @@ -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'; @@ -214,6 +215,8 @@ class CountryParser { return np; case 'fr': return fr; + case 'de': + return de; case 'en': default: return en; @@ -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)); diff --git a/lib/src/res/strings/de.dart b/lib/src/res/strings/de.dart new file mode 100644 index 0000000..4bb5345 --- /dev/null +++ b/lib/src/res/strings/de.dart @@ -0,0 +1,250 @@ +Map 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", +};