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/l10n.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.new(String locale)

Properties

answers String
No description provided for @answers.
no setter
app_title String
No description provided for @app_title.
no setter
back String
No description provided for @back.
no setter
back_home String
No description provided for @back_home.
no setter
birth_message String
No description provided for @birth_message.
no setter
code_message String
No description provided for @code_message.
no setter
code_used String
No description provided for @code_used.
no setter
cognition_test String
No description provided for @cognition_test.
no setter
continue_ String
No description provided for @continue_.
no setter
data_error String
No description provided for @data_error.
no setter
date String
No description provided for @date.
no setter
degree String
No description provided for @degree.
no setter
delete_message String
No description provided for @delete_message.
no setter
delete_profile String
No description provided for @delete_profile.
no setter
education_message String
No description provided for @education_message.
no setter
enter_nickname String
No description provided for @enter_nickname.
no setter
error_text String
No description provided for @error_text.
no setter
error_title String
No description provided for @error_title.
no setter
female String
No description provided for @female.
no setter
hand String
No description provided for @hand.
no setter
hand_message String
No description provided for @hand_message.
no setter
hashCode int
The hash code for this object.
no setterinherited
l String
No description provided for @l.
no setter
left String
No description provided for @left.
no setter
localeName String
final
male String
No description provided for @male.
no setter
master String
No description provided for @master.
no setter
mistakes String
No description provided for @mistakes.
no setter
my_tests String
No description provided for @my_tests.
no setter
nickname String
No description provided for @nickname.
no setter
nickname_used String
No description provided for @nickname_used.
no setter
no_tests String
No description provided for @no_tests.
no setter
numberOfSymbols_message String
No description provided for @numberOfSymbols_message.
no setter
or String
No description provided for @or.
no setter
phd String
No description provided for @phd.
no setter
primary String
No description provided for @primary.
no setter
profile_creation String
No description provided for @profile_creation.
no setter
r String
No description provided for @r.
no setter
result_test String
No description provided for @result_test.
no setter
No description provided for @right.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
save_profile String
No description provided for @save_profile.
no setter
score String
No description provided for @score.
no setter
secondary String
No description provided for @secondary.
no setter
sex_message String
No description provided for @sex_message.
no setter
start String
No description provided for @start.
no setter
start_test String
No description provided for @start_test.
no setter
start_trial String
No description provided for @start_trial.
no setter
symbols String
No description provided for @symbols.
no setter
test_explanation String
No description provided for @test_explanation.
no setter
test_finished String
No description provided for @test_finished.
no setter
test_finished_wrong String
No description provided for @test_finished_wrong.
no setter
test_instructions String
No description provided for @test_instructions.
no setter
trial_completed String
No description provided for @trial_completed.
no setter
trial_title String
No description provided for @trial_title.
no setter
trial_warning String
No description provided for @trial_warning.
no setter
unfinished_test String
No description provided for @unfinished_test.
no setter
user String
No description provided for @user.
no setter
value_select String
No description provided for @value_select.
no setter
view_profile String
No description provided for @view_profile.
no setter
view_tests String
No description provided for @view_tests.
no setter
welcome_message String
No description provided for @welcome_message.
no setter
well_done String
No description provided for @well_done.
no setter
wrong_code String
No description provided for @wrong_code.
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.