ubuntu_localizations

Creator: coderz1093

Last updated:

Add to Cart

Description:

ubuntu localizations

Ubuntu localizations for Flutter #




Provides extra localizations for Flutter-based Ubuntu applications.
The GlobalUbuntuLocalizations class provides as list of localization delegates
for all languages supported by Ubuntu. Furthermore, it provides a few Material
localization delegates that are not provided by flutter_localizations.
Usage #
import 'package:ubuntu_localizations/ubuntu_localizations.dart';
import 'l10n/app_localizations.dart';
copied to clipboard
MaterialApp(
localizationsDelegates: const <LocalizationsDelegate<dynamic>>[
...AppLocalizations.localizationsDelegates,
...GlobalUbuntuLocalizations.delegates,
],
supportedLocales: AppLocalizations.supportedLocales,
)
copied to clipboard
Text(UbuntuLocalizations.of(context).languageName)
copied to clipboard
Generate Material localizations #
Download CLDR and run:
dart run date_time_patterns.dart [/path/to/cldr/common/main/<locale>.xml]
dart run date_time_symbols.dart [/path/to/cldr/common/main/<locale>.xml]
copied to clipboard
This prints the date and time patterns and symbols specified in the CLDR file.
Copy one of the existing lib/src/material/material_localizations_<locale>.dart
files as a starting point, and paste the patterns and symbols into the file.
Finally, add the new delegate to lib/src/material/material_localizations.dart.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.