AppLocalizations class abstract

Callers can lookup localized strings with an instance of AppLocalizations returned by AppLocalizations.of(context).

Applications need to include AppLocalizations.delegate() in their app's localizationDelegates list, and the locales they support in the app's supportedLocales list. For example:

import 'l10n/app_localizations.dart';

return MaterialApp(
  localizationsDelegates: AppLocalizations.localizationsDelegates,
  supportedLocales: AppLocalizations.supportedLocales,
  home: MyApplicationHome(),
);

Update pubspec.yaml

Please make sure to update your pubspec.yaml to include the following packages:

dependencies:
  # Internationalization support.
  flutter_localizations:
    sdk: flutter
  intl: any # Use the pinned version from flutter_localizations

  # Rest of dependencies

iOS Applications

iOS applications define key application metadata, including supported locales, in an Info.plist file that is built into the application bundle. To configure the locales supported by your app, you’ll need to edit this file.

First, open your project’s ios/Runner.xcworkspace Xcode workspace file. Then, in the Project Navigator, open the Info.plist file under the Runner project’s Runner folder.

Next, select the Information Property List item, select Add Item from the Editor menu, then select Localizations from the pop-up menu.

Select and expand the newly-created Localizations item then, for each locale your application supports, add a new item and select the locale you wish to add from the pop-up menu in the Value field. This list should be consistent with the languages listed in the AppLocalizations.supportedLocales property.

Implementers

Constructors

AppLocalizations(String locale)

Properties

hashCode int
The hash code for this object.
no setterinherited
item_accessory_glasses String
No description provided for @item_accessory_glasses.
no setter
item_accessory_headphones String
No description provided for @item_accessory_headphones.
no setter
item_accessory_sunglasses String
No description provided for @item_accessory_sunglasses.
no setter
item_eye_black String
No description provided for @item_eye_black.
no setter
item_eye_blue String
No description provided for @item_eye_blue.
no setter
item_eye_brown String
No description provided for @item_eye_brown.
no setter
item_eye_green String
No description provided for @item_eye_green.
no setter
item_eye_grey String
No description provided for @item_eye_grey.
no setter
item_eye_hazel String
No description provided for @item_eye_hazel.
no setter
item_eye_red String
No description provided for @item_eye_red.
no setter
item_facial_hair_beard String
No description provided for @item_facial_hair_beard.
no setter
item_facial_hair_goatee String
No description provided for @item_facial_hair_goatee.
no setter
item_facial_hair_mustache String
No description provided for @item_facial_hair_mustache.
no setter
item_hair_auburn String
No description provided for @item_hair_auburn.
no setter
item_hair_black String
No description provided for @item_hair_black.
no setter
item_hair_blonde String
No description provided for @item_hair_blonde.
no setter
item_hair_blonde_golden String
No description provided for @item_hair_blonde_golden.
no setter
item_hair_brown String
No description provided for @item_hair_brown.
no setter
item_hair_brown_dark String
No description provided for @item_hair_brown_dark.
no setter
item_hair_pastel_pink String
No description provided for @item_hair_pastel_pink.
no setter
item_hair_platinum String
No description provided for @item_hair_platinum.
no setter
item_hair_red String
No description provided for @item_hair_red.
no setter
item_hair_silver String
No description provided for @item_hair_silver.
no setter
item_none String
No description provided for @item_none.
no setter
item_outfit_blazer_sweater String
No description provided for @item_outfit_blazer_sweater.
no setter
item_outfit_blazer_t_shirt String
No description provided for @item_outfit_blazer_t_shirt.
no setter
item_outfit_collar_sweater String
No description provided for @item_outfit_collar_sweater.
no setter
item_outfit_graphic_shirt String
No description provided for @item_outfit_graphic_shirt.
no setter
item_outfit_hoodie String
No description provided for @item_outfit_hoodie.
no setter
item_outfit_overall String
No description provided for @item_outfit_overall.
no setter
item_outfit_shirt_crew_neck String
No description provided for @item_outfit_shirt_crew_neck.
no setter
item_outfit_shirt_scoop_neck String
No description provided for @item_outfit_shirt_scoop_neck.
no setter
item_outfit_shirt_v_neck String
No description provided for @item_outfit_shirt_v_neck.
no setter
item_skin_black String
No description provided for @item_skin_black.
no setter
item_skin_brown String
No description provided for @item_skin_brown.
no setter
item_skin_dark_brown String
No description provided for @item_skin_dark_brown.
no setter
item_skin_peach String
No description provided for @item_skin_peach.
no setter
item_skin_tanned String
No description provided for @item_skin_tanned.
no setter
item_skin_white String
No description provided for @item_skin_white.
no setter
item_skin_yellow String
No description provided for @item_skin_yellow.
no setter
localeName String
final
property_category_accessories String
No description provided for @property_category_accessories.
no setter
property_category_backgrounds String
No description provided for @property_category_backgrounds.
no setter
property_category_effect_colors String
No description provided for @property_category_effect_colors.
no setter
property_category_effects String
No description provided for @property_category_effects.
no setter
property_category_eyebrows String
No description provided for @property_category_eyebrows.
no setter
property_category_eyes String
No description provided for @property_category_eyes.
no setter
property_category_facial_hair_colors String
No description provided for @property_category_facial_hair_colors.
no setter
property_category_facial_hair_types String
No description provided for @property_category_facial_hair_types.
no setter
property_category_hair_colors String
No description provided for @property_category_hair_colors.
no setter
property_category_hairstyles String
No description provided for @property_category_hairstyles.
no setter
property_category_mouths String
No description provided for @property_category_mouths.
no setter
property_category_noses String
No description provided for @property_category_noses.
no setter
property_category_outfit_colors String
No description provided for @property_category_outfit_colors.
no setter
property_category_outfit_types String
No description provided for @property_category_outfit_types.
no setter
property_category_skins String
No description provided for @property_category_skins.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unlock_cosmetic_level(int level) String
No description provided for @unlock_cosmetic_level.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) AppLocalizations

Constants

delegate → const LocalizationsDelegate<AppLocalizations>
localizationsDelegates → const List<LocalizationsDelegate>
A list of this localizations delegate along with the default localizations delegates.
supportedLocales → const List<Locale>
A list of this localizations delegate's supported locales.