Giter Club home page Giter Club logo

gaeilge_flutter_l10n's Introduction

Gaeilge Flutter Localisation

A custom localisation delegate for the Irish language for use with flutter.

A custom localizations delegate is required for supporting any languages not included in the list supported by default in flutter here GlobalMaterialLocalizations-class. This has been done for the Irish language due to it not yet being supported according to this issue ticket. Support for other languages may be added in the same way it has been for Irish by following the guide here. adding support for a new language

Features

Provides Irish language support for Flutter apps.

Getting started

Add this package to the dependencies of your Flutter application or project by adding it to your pubspec.yaml

dependencies:
  gaeilge_flutter_l10n: ^1.0.0

Import the package wherever your app is initialised.

import 'package:gaeilge_flutter_l10n/gaeilge_flutter_l10n.dart';

Usage

When initialising your app include GaMaterialLocalizations.delegate in your list of localisation delegates.

return const MaterialApp(
  title: 'Localizations Sample App',
  localizationsDelegates: [
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
    GaMaterialLocalizations.delegate, // Custom Irish delegate
  ],
  supportedLocales: [
    Locale('en', ''), // English, no country code
    Locale('ga', ''), // Irish, no country code
  ],
  home: MyHomePage(),
);

You may also extend the existing list of delegates using extendLanguageDelegates

...
  localizationsDelegates: extendLanguageDelegates(myDelegatesList)
...

Additional information

If there are any issues or required improvements please open an issue at https://github.com/gjpower/gaeilge_flutter_l10n

This project uses the BSD 3-Clause License.

If you make any changes or improvements please open a Pull Request so they be included to update the project.

gaeilge_flutter_l10n's People

Contributors

gjpower avatar

Watchers

 avatar

gaeilge_flutter_l10n's Issues

Package is broken with Flutter 3.0.0

When trying to build my app with Flutter 3.0.0 I get the following:

: Error: The non-abstract class 'GaMaterialLocalizations' is missing implementations for these members:
../…/src/ga_material_localisation.dart:303
 - MaterialLocalizations.keyboardKeyAlt
 - MaterialLocalizations.keyboardKeyAltGraph
 - MaterialLocalizations.keyboardKeyBackspace
 - MaterialLocalizations.keyboardKeyCapsLock
 - MaterialLocalizations.keyboardKeyChannelDown
 - MaterialLocalizations.keyboardKeyChannelUp
 - MaterialLocalizations.keyboardKeyControl
 - MaterialLocalizations.keyboardKeyDelete
 - MaterialLocalizations.keyboardKeyEisu
 - MaterialLocalizations.keyboardKeyEject
 - MaterialLocalizations.keyboardKeyEnd
 - MaterialLocalizations.keyboardKeyEscape
 - MaterialLocalizations.keyboardKeyFn
 - MaterialLocalizations.keyboardKeyHangulMode
 - MaterialLocalizations.keyboardKeyHanjaMode
 - MaterialLocalizations.keyboardKeyHankaku
 - MaterialLocalizations.keyboardKeyHiragana
 - MaterialLocalizations.keyboardKeyHiraganaKatakana
 - MaterialLocalizations.keyboardKeyHome
 - MaterialLocalizations.keyboardKeyInsert
 - MaterialLocalizations.keyboardKeyKanaMode
 - MaterialLocalizations.keyboardKeyKanjiMode
 - MaterialLocalizations.keyboardKeyKatakana
 - MaterialLocalizations.keyboardKeyMeta
 - MaterialLocalizations.keyboardKeyMetaMacOs
 - MaterialLocalizations.keyboardKeyMetaWindows
 - MaterialLocalizations.keyboardKeyNumLock
 - MaterialLocalizations.keyboardKeyNumpad0
 - MaterialLocalizations.keyboardKeyNumpad1
 - MaterialLocalizations.keyboardKeyNumpad2
 - MaterialLocalizations.keyboardKeyNumpad3
 - MaterialLocalizations.keyboardKeyNumpad4
 - MaterialLocalizations.keyboardKeyNumpad5
 - MaterialLocalizations.keyboardKeyNumpad6
 - MaterialLocalizations.keyboardKeyNumpad7
 - MaterialLocalizations.keyboardKeyNumpad8
 - MaterialLocalizations.keyboardKeyNumpad9
 - MaterialLocalizations.keyboardKeyNumpadAdd
 - MaterialLocalizations.keyboardKeyNumpadComma
 - MaterialLocalizations.keyboardKeyNumpadDecimal
 - MaterialLocalizations.keyboardKeyNumpadDivide
 - MaterialLocalizations.keyboardKeyNumpadEnter
 - MaterialLocalizations.keyboardKeyNumpadEqual
 - MaterialLocalizations.keyboardKeyNumpadMultiply
 - MaterialLocalizations.keyboardKeyNumpadParenLeft
 - MaterialLocalizations.keyboardKeyNumpadParenRight
 - MaterialLocalizations.keyboardKeyNumpadSubtract
 - MaterialLocalizations.keyboardKeyPageDown

Doesn't support intl 0.18.1

I tried to install it in my project, but I got this dependency version conflict error:

flutter pub add gaeilge_flutter_l10n

Because every version of gaeilge_flutter_l10n depends on intl ^0.17.0 and your_project depends on intl 0.18.1, gaeilge_flutter_l10n is forbidden.
So, because dmp_ui depends on gaeilge_flutter_l10n any, version solving failed.

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.