0 purchases
best flutter localization
Best naveen Localization flutter package for most common words used in mobile apps.
Features #
Using this package we can easily Localization of our apps.
Flutter localization is the process of adapting your Flutter app to work with different languages, regions, and cultures. It allows you to create applications that can be used by people around the world by providing translations for text and content, as well as adapting other aspects like date and time formats, number formats, and more to suit the target audience.
Getting started #
first add best_naveen_localization dep in pubspec.yaml
dependencies:
flutter:
sdk: flutter
best_naveen_localization:
Usage #
Common Translations: This package offers a set of pre-defined, common translations accessible through CommonTranslations. These include basic words like 'back', 'cancel', 'confirm', 'contactUs', etc. This feature allows for quick access to standard translations without needing to define them manually.
Custom Translations: The package allows for the creation of custom translations. This is done by defining a map of translations for each language. The example provided includes translations for English ('en'), Finnish ('fi'), and Arabic ('ar') for words like 'explore', 'profile', and 'name'.
Manual Language Setting: There is an option to manually set the language for translations using GetLocale.langcode. This is useful for scenarios where the language might need to be set dynamically or overridden from the device's default language.
Assigning and Retrieving Translations: Custom translations are assigned to GetTranslate.translations. Retrieving a translation is straightforward; you use GetTranslate.getTranslation(key), where key is the word or phrase you want to translate.
Example Usage: The code demonstrates how to retrieve and print translations for 'profile', 'explore', and 'name' in the currently set language.
import the package where you want to use
import 'package:best_flutter_localization/best_naveen_localization.dart';
String settings = CommonTranslations.settings;
String chats = CommonTranslations.chats;
String help = CommonTranslations.help;
String account = CommonTranslations.account;
String save = CommonTranslations.save;
String search = CommonTranslations.search;
String accountCreatedSuccessfully = CommonTranslations.accountCreatedSuccessfully;
String accountDeletedSuccessfully = CommonTranslations.accountDeletedSuccessfully;
String createAccount = CommonTranslations.createAccount;
String currentLocation = CommonTranslations.currentLocation;
Additional information #
if any suggestions you can email me on [email protected] or telegram @Naveenmusic
Support
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.