Skip to content

Commit

Permalink
Merge pull request #8 from masseelch/master
Browse files Browse the repository at this point in the history
Added german translations
  • Loading branch information
themisir authored Aug 20, 2020
2 parents ffd287c + cfe40da commit 74f1828
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/i18n/all.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import '../form_validator_locale.dart';

import 'az.dart';
import 'de.dart';
import 'en.dart';
import 'fr.dart';
import 'tr.dart';
Expand All @@ -9,7 +10,10 @@ FormValidatorLocale createLocale(String locale) {
switch (locale) {
case 'az':
return LocaleAz();


case 'de':
return LocaleDe();

case 'fr':
return LocaleFr();

Expand Down
32 changes: 32 additions & 0 deletions lib/src/i18n/de.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import '../form_validator_locale.dart';

class LocaleDe extends FormValidatorLocale {
@override
String name() => 'de';

@override
String minLength(String v, int n) =>
'Es sind mindestens $n Zeichen erforderlich';

@override
String maxLength(String v, int n) =>
'Es sind maximal $n Zeichen erlaubt';

@override
String email(String v) => 'Dies ist keine gültige E-Mail';

@override
String phoneNumber(String v) => 'Dies ist keine gültige Telefonnummer';

@override
String required() => 'Dieses Feld ist erforderlich';

@override
String ip(String v) => 'Dies ist keine gütlige IP-Adresse';

@override
String ipv6(String v) => 'Dies ist keine gütlige IPv6-Adresse';

@override
String url(String v) => 'Dies ist keine gültige URL';
}

0 comments on commit 74f1828

Please sign in to comment.