Skip to content

Latest commit

 

History

History

flutter_localizer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Flutter Localizer

Pub Version

Flutter port of localizer. Simple to use dart package to localize your app.

Features

  • 🚀 Written in pure dart
  • ⚡ Load data from files (json and yaml), directories or maps
  • ❤️ Simple, powerful, & intuitive API

Getting started

Add the package to your project.

  • Use flutter pub add <package> or dart pub add <package> to add this package to your project

  • Add the package manually to your project

      dependencies:
          flutter_localizer: latest

    Replace latest with the latest version

Usage

Create a new localizer instance, add your localization to it and get them.

// Uses file l10n/en.json as default
var localizer = Localizer.fromAsset();

print("EN: ${localizer.get("en", "hello-world")}");
print("ES: ${localizer.get("es", "hello-world")}");
print("FR: ${localizer.get("fr", "hello-world")}");
print("DE: ${localizer.get("de", "hello-world")}");