v1.0.0+8bye_bye_localization
임베디드 기기에서 즉시 번역 AI 모델을 사용하여 어떤 텍스트도 원하는 언어로 번역할 수 있는 간단한 Text 위젯입니다. 텍스트를 제공하기만 하면 위젯이 자동으로 번역합니다. 결과적으로 로컬라이제이션 파일을 지정하거나 수동으로 번역을 입력할 필요가 없으며, 위젯이 모든 작업을 대신 수행합니다.
간단한 Text 위젯으로, 즉시 장치 내 번역 AI 모델을 사용하여 어떤 텍스트도 어떤 언어로든 번역할 수 있습니다. 텍스트를 제공하기만 하면 위젯이 자동으로 번역되므로, 로컬라이제이션 파일을 지정하거나 수동으로 번역을 입력할 필요가 없습니다. 위젯이 모든 작업을 대신해 줍니다.
{"sdk":"flutter"}^0.6.0{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Its just a simple Text widget that will provide automatic fast translation for any text. it supports 59 languages.
No more boring Localization configuration files, all you have to do is change your old Text() widget to TranslatedText() and enjoy the sweet sweet life without Localization
PS: the translation will be fast as it uses translation model deployed to the device under the hood.
Demo
Step 1: All you have to do is call the widget
TranslatedText('your text')
Step2: don't forget to call init the widget using the Manager
Future<bool> initWidget() async {
return await TranslationManager().init(
originLanguage: Languages.ENGLISH,
translateToLanguage: Languages.ARABIC,
);
}
Step 3: Buy me Coffee 🙂! ☕️
coffee
Widget buildWidget(){
return FutureBuilder(
future: initTranslation(),
builder: (context, snapshot) {
if (snapshot.hasError) {
return Text('${snapshot.error}');
}
if (snapshot.connectionState == ConnectionState.done) {
return TranslatedText('I am a text that will be translated always');
}
return CircularProgressIndicator();
},
);
}
Future<bool> initWidget() async {
return await TranslationManager().init(
originLanguage: Languages.ENGLISH,
/// Change here the language to change the translation, and re run.
/// For example Languages.RUSSIAN.
translateToLanguage: Languages.ARABIC,
);
}
below you will find a link to APK contains live demo
Muwaffaq Imam