Giter Club home page Giter Club logo

l10n_esperanto's Introduction

l10n_esperanto

Esperanto localization for Flutter. This will only localize the basic strings (just like with all the other languages supported by Flutter) and the various date and time formats of the intl package. Your own app strings have to be handled by your own localization, as per normal.

Otherwise, it will work just as expected for apps. Although no Android device has Esperanto as a system language, so the locale won't be selected automatically, you can use it as one of the languages available in your app. You can even make it the default language (not using English at all) and all devices will show your app in Esperanto, unless another language is selected.

Getting Started

Use it in your app:

MaterialApp(
  supportedLocales: [
    const Locale(...),
    const Locale('eo'),
  ],
  localizationsDelegates: const [
    GlobalMaterialLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
    MaterialLocalizationsEo.delegate,
    CupertinoLocalizationsEo.delegate,
  ],

If you use the standard Flutter Intl internationalization in your app:

MaterialApp(
  supportedLocales: S.delegate.supportedLocales,
  localizationsDelegates: const [
    S.delegate,
    MaterialLocalizationsEo.delegate,
    CupertinoLocalizationsEo.delegate,
  ],

Note that the order is important, always start with the global ones.

Using DateFormat

A known limitation seems to be that you can only access DateFormat settings of a custom locale if your app runs in the same locale. Make sure you also specify the locale either in the app itself or by user choice

MaterialApp(
  locale: const Locale('eo'),
  supportedLocales: ...,
  localizationsDelegates: ...,

if you plan to use a call like

DateFormat.MMMMEEEEd('eo').format(DateTime.now())

l10n_esperanto's People

Contributors

deakjahn avatar florian-obernberger avatar kefiiris avatar 12people avatar gilaraujo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.