Dynamically translate text

Overview

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'),);
  }, 
);
You might also like...

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

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

Dec 19, 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

Dec 28, 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

Oct 3, 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 -

Nov 4, 2022

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

Nov 4, 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

Aug 27, 2022
Comments
  • Class 'String' has no instance method '<<'

    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
    
    bug 
    opened by Akshay-akkay 3
  • does not return source language

    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

    opened by fapcruz 1
Owner
Matteo Sipione
Entrepreneur | Creative | Always positive
Matteo Sipione
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

Anup Kumar Panwar 18 Dec 15, 2021
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

Alok Dubey 7 Sep 4, 2022
Text analyzer that extracts tokens from text for use in full-text search queries and indexes.

Tokenize text, compute document readbility and compare terms in Natural Language Processing. THIS PACKAGE IS PRE-RELEASE, and SUBJECT TO DAILY BREAKIN

GM Consult Pty Ltd 5 Dec 12, 2022
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

null 135 Dec 31, 2022
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

Yusril Rapsanjani 15 Apr 17, 2022
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

Wuba 1.8k Dec 30, 2022
Flutter dynamically load translation in your app.

Flutter dynamically load translation in your app.

null 1 Apr 4, 2022
Tool made in Dart that allows you to dynamically generate JSON files from data models written in Dart.

Dart JSON Generator Versión v1.1.1 Dart JSON Generator es una herramienta que permite generar archivos JSON a partir de mapas como modelos de datos en

Joinner Medina 7 Nov 23, 2022
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

Mehdi Zarepour 68 Dec 16, 2022
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

Karthik Sunil K 3 Jan 31, 2022