CdxCommentsLocalizations class abstract

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

Applications need to include CdxCommentsLocalizations.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: CdxCommentsLocalizations.localizationsDelegates,
  supportedLocales: CdxCommentsLocalizations.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 CdxCommentsLocalizations.supportedLocales property.

Implementers

Constructors

CdxCommentsLocalizations(String locale)

Properties

add_a_comment String
Placeholder text for comment input field
no setter
answer String
Button text to reply to a comment
no setter
answer_to String
Label showing who you are replying to
no setter
block_user String
Checkbox label for blocking a user
no setter
blocked_until String
Label showing when user is blocked until
no setter
cancel String
Cancel button text
no setter
comment_bad_words String
Error message when comment contains bad words
no setter
comment_dangerous String
Error message when comment contains dangerous content
no setter
comment_empty String
Error message when comment is empty
no setter
comments String
Title for comments section
no setter
confirm String
Confirm button text
no setter
delete String
Delete action label
no setter
delete_comment String
Title for delete comment dialog
no setter
end String
Submit button text
no setter
hashCode int
The hash code for this object.
no setterinherited
load_more_replies String
Button to load next page of replies
no setter
localeName String
final
next String
Next button text
no setter
q_delete_comment String
Confirmation question for deleting a comment
no setter
q_report_comment String
Question for reporting a comment
no setter
q_report_user String
Question for reporting a user
no setter
report String
Report action label
no setter
report_done String
Success message after submitting a report
no setter
report_user String
Checkbox label for reporting a user
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

comment_too_long(int maxLength) String
Error message when comment is too long
comment_too_many_lines(int maxLines) String
Error message when comment has too many lines
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
view_replies(int count) String
Button text to view replies

Operators

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

Static Methods

of(BuildContext context) CdxCommentsLocalizations?

Constants

delegate → const LocalizationsDelegate<CdxCommentsLocalizations>
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.