Dynamically translate text

Last update: Jan 27, 2022

auto_localization

A new Flutter plugin. Flutter package to dynamically translate your app.

This plugin will AUTOMATICALLY detect the app Localization and translate the text.

HOW IT WORKS

So the point was to find a way to convincely translate text in all the languages. To do that we create this system who seam to works really well. It Uses Google Translate

Getting Started

There is even a cache system to make it faster. Add the dependency in pubspec.yaml:

dependencies:
  ...
  auto_localization: ^2.0.2

HOW TO USE

init the plugin

await AutoLocalization.init(
  appLanguage: 'en',
  userLanguage: 'it'
);

Translate something

await AutoLocalization.translate("hello");

Use the builder to translate widgets smoothly

AutoLocalBuilder(
  text: const ["ciao", "come stai?"],
  builder: (TranslationWorker tw) {
    print(tw.get('ciao'));
    print(tw.get('come stai?'));
    return Text(tw.get('ciao'),);
  }, 
);

GitHub

https://github.com/Sipioteo/auto_localization
You might also like...

Flutter plugin for selecting images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotation, cropping, adding sticker/text/filters.

Flutter plugin for selecting images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotation, cropping, adding sticker/text/filters.

advance_image_picker Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edi

May 21, 2022

This is a Flutter app which shows how to use the Selectable Text in your app

selectable_text A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Oct 25, 2021

Flutter circular text widget

Flutter circular text widget

Circular Text Widget Installation Add dependency in pubspec.yaml: dependencies: flutter_circular_text: "^0.3.1" Import in your project: import 'pack

Apr 12, 2022

Dynamic Text Highlighting (DTH) package for Dart & Flutter.

Dynamic Text Highlighting (DTH) package for Dart & Flutter.

Dynamic Text Highlighting (DTH) This package is used to highlight, in a completely dynamic way, keywords, or phrases, wherever they are present in a s

Apr 26, 2022

Low-level link (text, URLs, emails) parsing library in Dart

linkify Low-level link (text, URLs, emails) parsing library in Dart. Required Dart =2.12 (has null-safety support). Flutter library. Pub - API Docs -

Dec 11, 2021

Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links

Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links

LinkText Easy to use text widget for Flutter apps, which converts inlined URLs into clickable links. Allows custom styling. Usage LinkText widget does

Feb 27, 2022

Be together, whenever. A simple way to text chat and plan things all in one place for flutter developers.

Be together, whenever. A simple way to text chat and plan things all in one place for flutter developers.

Flutterdevconnect Be together, whenever. A simple way to text chat and plan things all in one place for flutter developers. Android IOS Web PWA Androi

Apr 20, 2022

flutter grpc video app && microsoft text to speech

flutter grpc video app && microsoft text to speech

flutter_video_app Getting Started Install dart protoc_plugin pub global activate protoc_plugin Clone WarpDriveProtocol git clone [email protected]

Dec 14, 2021

A Fluter tabview that text color can change with animation and bg color change with animation

A Fluter tabview that text color can change with animation and bg color change with animation

float_tab A Fluter tabview that text color can change with animation and bg color change with animation Getting Started This project is a starting poi

Dec 8, 2021
Comments
  • 1. Class 'String' has no instance method '<<'

    Showing this error in console every time the package fuction runs.

    E/flutter ( 4524): [ERROR:flutter/shell/common/shell.cc(103)] Dart Unhandled Exception: NoSuchMethodError: Class 'String' has no instance method '<<'.
    E/flutter ( 4524): Receiver: "406398"
    E/flutter ( 4524): Tried calling: <<(3), stack trace: #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
    E/flutter ( 4524): #1      GoogleTokenGenerator.wr
    package:translator/…/tokens/google_token_gen.dart:80
    E/flutter ( 4524): #2      GoogleTokenGenerator.tokenGen
    package:translator/…/tokens/google_token_gen.dart:58
    E/flutter ( 4524): #3      GoogleTokenGenerator.generateToken
    package:translator/…/tokens/google_token_gen.dart:14
    E/flutter ( 4524): #4      GoogleTranslator.translate
    package:translator/src/google_translator.dart:46
    E/flutter ( 4524): #5      AutoLocalization._executeTranslate
    package:auto_localization/auto_localization.dart:66
    E/flutter ( 4524): <asynchronous suspension>
    E/flutter ( 4524): #6      AutoLocalization.translate
    package:auto_localization/auto_localization.dart:80
    E/flutter ( 4524): <asynchronous suspension>
    E/flutter ( 4524): #7      _TranslatedTextState.translateText
    package:housy_pro/…/widgets/translatedText.dart:31
    E/flutter ( 4524): <asynchronous suspension>
    E/flutter ( 4524):
    I/chatty  ( 4524): uid=10153(com.housypartner) 2.ui identical 1258 lines
    
    Reviewed by Akshay-akkay at 2021-08-01 09:22
  • 2. does not return source language

    Hello, I implemented the package and after changing some routines, I went to test another language, changed from BaseLanguage().setBaseLanguage(""); for BaseLanguage().setBaseLanguage("en"); and no longer returns to the original language BaseLanguage().setBaseLanguage("pt"); have any guidance? Thank you

    Reviewed by fapcruz at 2020-03-20 20:50

Related

A Flutter widget to dynamically add links to your text.
A Flutter widget to dynamically add links to your text.

linkable A Flutter widget to add links to your text. By default, the Text or RichText widgets render the URLs in them as simple text which are not cli

Dec 15, 2021
Masked text field - A flutter package for masked text field for formet your text and good UI
Masked text field - A flutter package for masked text field for formet your text and good UI

Masked Text Field Masked Text Field Features A package for masked text field for

Feb 22, 2022
Dynamically themed Music Player built with flutter
Dynamically themed Music Player built with flutter

?? Flutter Music Player Contact me email: [email protected] Gitter: https://gitter.im/Moda20TuneIn/community Thank you in advance ?? Getting Started

Apr 20, 2022
Polymaker is an application that can create polygon locations dynamically in mobile apps and save the data into SQFlite to be permanent.
Polymaker is an application that can create polygon locations dynamically in mobile apps and save the data into SQFlite to be permanent.

Polymaker Polymaker is an application that can create polygon locations dynamically in mobile apps and save the data into SQFlite to be permanent. Ins

Apr 17, 2022
A Flutter package used to update widget tree dynamically
A Flutter package used to update widget tree dynamically

简体中文|English Fair is a lightweight package for Flutter, which can be used to update widget tree and state dynamically. This package is still at an ear

May 19, 2022
Flutter dynamically load translation in your app.

Flutter dynamically load translation in your app.

Apr 4, 2022
An Instagram like text editor Flutter widget that helps you to change your text style.
An Instagram like text editor Flutter widget that helps you to change your text style.

TextEditor An instagram like text editor widget for flutter Show some ❤️ and star the repo to support the project Features Edit TextStyle object font

Apr 30, 2022
Grad text package - A Flutter Widget to draw gradients into text
Grad text package - A Flutter Widget to draw gradients into text

grad_text A Flutter Widget to draw gradients into text.(Null safe) Demo Install

Jan 31, 2022
Detectable text field - Flutter Text widgets with detection features
Detectable text field - Flutter Text widgets with detection features

detectable_text_field Text widgets with detection features. You can detect hasht

Feb 2, 2022
A text field that displays text on different languages based on your selection.

translatable_text_field A text field that displays text on different languages based on your selection. Its basic idea is that you place this fields i

Mar 13, 2022