Open
Conversation
Add localization support for the following languages: - Italian (IT) - Slovenian (SL) - Croatian (HR) - French (FR) - Polish (PL) - Slovak (SK) - Czech (CS) - Bosnian (BS) - Serbian (SR) - Turkish (TR) - Ukrainian (UK) - Swedish (SV) - Norwegian (NO) - Hungarian (HU) - Dutch (NL) - Japanese (JA) - Hindi (HI) - Korean (KO) Changes include: - Created language-specific localization files for each new language - Updated the supported locales list in croppy_localizations.dart - Added corresponding exports in _l10n.dart - Updated the lookupCroppyLocalizations function
|
I am a Flutter developer developing an app using the croppy package in Korea. The Korean translations mentioned here are generally excellent, and I hope this PR will be merged soon! // 🐦 Flutter imports:
import 'package:flutter/widgets.dart';
// 📦 Package imports:
import 'package:croppy/croppy.dart';
class CamiCroppyLocalizations extends LocalizationsDelegate<CroppyLocalizations> {
const CamiCroppyLocalizations();
@override
bool isSupported(Locale locale) => ['ko', 'en'].contains(locale.languageCode);
@override
Future<CroppyLocalizations> load(Locale locale) async {
switch (locale.languageCode) {
case 'ko':
return CroppyLocalizationsKo();
case 'en':
return CroppyLocalizationsEn();
}
return lookupCroppyLocalizations(locale);
}
@override
bool shouldReload(CamiCroppyLocalizations old) => false;
}
class CroppyLocalizationsKo extends CroppyLocalizations {
CroppyLocalizationsKo() : super('ko');
@override
String get saveLabel => '저장';
@override
String get doneLabel => '완료';
@override
String get cancelLabel => '취소';
@override
String get cupertinoFreeformAspectRatioLabel => '자유 비율';
@override
String get cupertinoOriginalAspectRatioLabel => '원본';
@override
String get cupertinoResetLabel => '초기화';
@override
String get cupertinoSquareAspectRatioLabel => '정사각형';
@override
String materialGetFlipLabel(LocalizationDirection direction) {
switch (direction) {
case LocalizationDirection.horizontal:
return '가로로 뒤집기';
case LocalizationDirection.vertical:
return '세로로 뒤집기';
}
}
@override
String get materialFreeformAspectRatioLabel => '자유 비율';
@override
String get materialOriginalAspectRatioLabel => '원본';
@override
String get materialResetLabel => '초기화';
@override
String get materialSquareAspectRatioLabel => '정사각형';
}
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Localization Support for 18 New Languages
Added Languages:
Implementation Details:
croppy_localizations.dart_l10n.dartlookupCroppyLocalizationsfunctionThis PR significantly expands the international reach of the Croppy package, making it more accessible to users worldwide.