A dart package to automaticly download translations from the icapps translation tool

A dart package to automaticly download translations from the icapps translation tool

A dart package to automaticly download translations from the icapps translation tool. The rest of the implementation is done by locale_gen

flutter icapps translations

A dart package to automaticly download translations from the icapps translation tool. The rest of the implementation is done by locale_gen https://pub.dev/packages/locale_gen

Example

Example

Setup

Add dependency to pubspec

dev-dependencies:
  icapps_translations: <latest-version>

Add config to pubspec

Add your locale folder to the assets to make use all your translations are loaded.

flutter:
  assets:
    - assets/locale/

Add the icapps_translations config to fetch the latest translations

icapps_translations:
  api_key: 'enter-your-api-key'
  default_language: 'nl'
  languages: ['en', 'nl']
  locale_assets_path: 'assets/locale/' //This is the location where your json files should be saved.
  assets_path: 'assets/locale/' //This is the location where your json files are located in your flutter app.

set an env variable for your api_key

API_KEY_ICAPPS_TRANSLATIONS

Run package with Flutter

flutter packages pub run icapps_translations

Run package with Dart

pub run icapps_translations

Arguments

Arguments are supported as of 0.1.3

You can pass a String or a num to as an argument.

Formatting for String: %1$s Formatting for num: %1$d

The number in between % and $ indicate the index of the argument. It is possible to place an argument in 1 language first but in another second:

ex (Grammatically incorrect but it makes my point):

nl '%1$s, ik woon in %2$s. Wist je dat niet?' => KOEN, ik woon in ANTWERPEN. Wist je dat niet?

fr 'I live in %2$s. You didn't knew that %1$s?" => I live in ANTWERP. You didn't knew that KOEN?

Working on mac?

add this to you .bash_profile

fluttertranslations(){
 flutter packages get && flutter packages pub run icapps_translations
}

now you can use the icapps translations with a single command.

fluttertranslations

Example

This repo contains an example how to use this package.

Packages used:

  • flutter_localizations
  • shared_preferences
  • provider
  • kiwi
  • icapps_translations

Download Details:

Author: icapps

Source Code: https://github.com/icapps/flutter-icapps-translations

flutter dart mobile-apps

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

Top 25 Flutter Mobile App Templates in 2020

Flutter has been booming worldwide from the past few years. While there are many popular mobile app development technologies out there, Flutter has managed to leave its mark in the mobile application development world. In this article, we’ve curated the best Flutter app templates available on the market as of July 2020.

Flutter App Development Trends 2020

As the new decade dawns upon us, a slew of technologies has been making a lot of noise to grab the developers’ attention. While native app development is going strong, the trade winds are now blowing towards going cross-platform.

How To Succeed In Mobile App Wireframe Design?

This article covers everything about mobile app wireframe design: what to do and what not, tools used in designing a mobile or web app wireframe, and more.

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).