Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dutch (nl) language translations #49

Merged
merged 1 commit into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/src/i18n/all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'he.dart';
import 'id.dart';
import 'it.dart';
import 'ja.dart';
import 'nl.dart';
import 'pl.dart';
import 'pt_br.dart';
import 'ro.dart';
Expand Down Expand Up @@ -38,6 +39,7 @@ const localeMap = <String, FormValidatorLocale>{
'th': LocaleTh(),
'vi': LocaleVi(),
'ro': LocaleRo(),
'nl': LocaleNl(),
};

// [1] - https://github.com/themisir/form-validator/pull/35
Expand Down
34 changes: 34 additions & 0 deletions lib/src/i18n/nl.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import '../locale.dart';

class LocaleNl implements FormValidatorLocale {
const LocaleNl();

@override
String name() => 'nl';

@override
String minLength(String v, int n) =>
'Minimaal $n karakters verplicht';

@override
String maxLength(String v, int n) =>
'Maximaal $n karakters verplicht';

@override
String email(String v) => 'Ongeldig e-mailadres';

@override
String phoneNumber(String v) => 'Ongeldig telefoonnummer';

@override
String required() => 'Verplicht veld';

@override
String ip(String v) => 'Ongeldig IP-adres';

@override
String ipv6(String v) => 'Ongeldig IPv6-adres';

@override
String url(String v) => 'Ongeldige URL';
}