-
Notifications
You must be signed in to change notification settings - Fork 58
Intl4x API refactorings. #1023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Intl4x API refactorings. #1023
Changes from all commits
7c37eb1
800fa3d
da4cca2
73a9c25
fc55e53
ecd334e
bba848b
44834d6
c25c00c
c2e4f1b
a6c8a06
cadc5c7
278eb01
f2620ef
4f4ef6f
7bf5e2a
460cd23
a55c3d4
793e362
7f1aed6
26a7252
40d0c76
e03fa61
2857551
296951d
fd6a16c
c1a0bf0
8b121e9
bffed6e
a7cda77
cd51d8b
c3af2ba
67ac5cc
00f3cd0
a799009
90673cf
349356d
ae2002b
cb7e904
7289c83
a612fb7
3bcdcfa
681a585
94eafc2
472eba6
a5ff0d2
dcee5f6
f632e8f
686d86a
d76db90
660445c
747d5f1
afd7f0e
fab9287
d425a63
6038a47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,3 +18,5 @@ pkgs/intl/test/number_format_compact_google3_icu_test.dart | |
| pkgs/intl/update_from_cldr_data.sh | ||
|
|
||
| .vscode | ||
|
|
||
| doc/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,40 @@ | |
| // for details. All rights reserved. Use of this source code is governed by a | ||
| // BSD-style license that can be found in the LICENSE file. | ||
|
|
||
| /// Formatting names in different locales. | ||
| /// | ||
| /// For a given [Locale], show the name of some information in that locale. | ||
| /// Provides several options as part of the [DisplayNames] constructor, such as | ||
| /// [Style], [LanguageDisplay], or [Fallback]. | ||
| /// | ||
| /// Languages: | ||
| /// ```dart | ||
| /// // Display the name of the language German in English | ||
| /// DisplayNames(locale: Locale.parse('en-US')) | ||
| /// .ofLanguage(Locale.parse('de-DE')); // German (Germany) | ||
| /// | ||
| /// // Display the name of the language French in Chinese | ||
| /// DisplayNames(locale: Locale.parse('zh-Hant')) | ||
| /// .ofLanguage(Locale.parse('fr')); // 法文 | ||
| /// ``` | ||
| /// | ||
| /// Regions: | ||
| /// ```dart | ||
| /// // Display the name of the region es-419, Latin America, in English | ||
| /// DisplayNames(locale: Locale.parse('en')) | ||
| /// .ofRegion('419'); // Latin America | ||
| /// | ||
| /// // Display the name of the region Germany in Spanish | ||
| /// DisplayNames(locale: Locale.parse('es-419')) | ||
| /// .ofLanguage(Locale.parse('de')); // Alemania | ||
|
Comment on lines
+29
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This example seems to have a copy-paste error. To get the name of the region 'Germany' in Spanish, you should use /// DisplayNames(locale: Locale.parse('es-419'))
/// .ofRegion('DE'); // Alemania |
||
| /// ``` | ||
| /// | ||
| /// | ||
| library; | ||
|
|
||
| import 'display_names.dart'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| export 'src/display_names/display_names.dart' show DisplayNames; | ||
| export 'src/display_names/display_names_options.dart'; | ||
| export 'src/options.dart'; | ||
| export 'src/display_names/display_names_options.dart' | ||
| show DisplayType, Fallback, LanguageDisplay, Style; | ||
| export 'src/locale/locale.dart' show Locale; | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.