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 'generated/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

appTitle String
No description provided for @appTitle.
no setter
authenticating String
No description provided for @authenticating.
no setter
back String
No description provided for @back.
no setter
cancel String
No description provided for @cancel.
no setter
changingPassword String
No description provided for @changingPassword.
no setter
close String
No description provided for @close.
no setter
confirmPassword String
No description provided for @confirmPassword.
no setter
connecting String
No description provided for @connecting.
no setter
continueAction String
No description provided for @continueAction.
no setter
delete String
No description provided for @delete.
no setter
disconnecting String
No description provided for @disconnecting.
no setter
edit String
No description provided for @edit.
no setter
email String
No description provided for @email.
no setter
emailAlreadyExists String
No description provided for @emailAlreadyExists.
no setter
error String
No description provided for @error.
no setter
finish String
No description provided for @finish.
no setter
firstName String
No description provided for @firstName.
no setter
hashCode int
The hash code for this object.
no setterinherited
info String
No description provided for @info.
no setter
invalidCredentials String
No description provided for @invalidCredentials.
no setter
invalidEmail String
No description provided for @invalidEmail.
no setter
lastName String
No description provided for @lastName.
no setter
loading String
No description provided for @loading.
no setter
localeName String
final
login String
No description provided for @login.
no setter
loginFailed String
No description provided for @loginFailed.
no setter
loginSuccess String
No description provided for @loginSuccess.
no setter
logout String
No description provided for @logout.
no setter
logoutSuccess String
No description provided for @logoutSuccess.
no setter
networkError String
No description provided for @networkError.
no setter
next String
No description provided for @next.
no setter
no String
No description provided for @no.
no setter
ok String
No description provided for @ok.
no setter
password String
No description provided for @password.
no setter
passwordChanged String
No description provided for @passwordChanged.
no setter
passwordChangeFailed String
No description provided for @passwordChangeFailed.
no setter
passwordResetFailed String
No description provided for @passwordResetFailed.
no setter
passwordResetSent String
No description provided for @passwordResetSent.
no setter
passwordsDoNotMatch String
No description provided for @passwordsDoNotMatch.
no setter
passwordTooShort String
No description provided for @passwordTooShort.
no setter
previous String
No description provided for @previous.
no setter
register String
No description provided for @register.
no setter
registering String
No description provided for @registering.
no setter
registrationFailed String
No description provided for @registrationFailed.
no setter
registrationSuccess String
No description provided for @registrationSuccess.
no setter
requiredField String
No description provided for @requiredField.
no setter
retry String
No description provided for @retry.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
save String
No description provided for @save.
no setter
sendingResetEmail String
No description provided for @sendingResetEmail.
no setter
serverError String
No description provided for @serverError.
no setter
skip String
No description provided for @skip.
no setter
success String
No description provided for @success.
no setter
username String
No description provided for @username.
no setter
usernameAlreadyExists String
No description provided for @usernameAlreadyExists.
no setter
usernameTooShort String
No description provided for @usernameTooShort.
no setter
userNotFound String
No description provided for @userNotFound.
no setter
validationError String
No description provided for @validationError.
no setter
warning String
No description provided for @warning.
no setter
weakPassword String
No description provided for @weakPassword.
no setter
yes String
No description provided for @yes.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

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.