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 Korean(ko) translations #57

Merged
merged 1 commit into from
Feb 1, 2024
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 @@ -20,6 +20,7 @@ import 'tr.dart';
import 'vi.dart';
import 'zh_cn.dart';
import 'bn.dart';
import 'ko.dart';

const localeMap = <String, FormValidatorLocale>{
'ar': LocaleAr(),
Expand All @@ -43,6 +44,7 @@ const localeMap = <String, FormValidatorLocale>{
'vi': LocaleVi(),
'ro': LocaleRo(),
'nl': LocaleNl(),
'ko': LocaleKo(),
};

final supportedLocales = localeMap.keys.toList();
Expand Down
24 changes: 24 additions & 0 deletions lib/src/i18n/ko.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import '../locale.dart';

class LocaleKo implements FormValidatorLocale {
const LocaleKo();

@override
String name() => 'ko';
@override
String required() => '이 항목을 입력해주세요.';
@override
String minLength(String v, int n) => '이 항목은 $n자 이상으로 입력해주세요';
@override
String maxLength(String v, int n) => '이 항목은 최대 $n자 이내로 입력해주세요';
@override
String email(String v) => '올바른 이메일주소를 입력해주세요';
@override
String phoneNumber(String v) => '올바른 전화번호를 입력해주세요';
@override
String ip(String v) => '올바른 IP주소를 입력해주세요';
@override
String ipv6(String v) => '올바른 IPv6주소를 입력해주세요';
@override
String url(String v) => '올바른 URL주소를 입력해주세요';
}