OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * This library provides internationalization and localization. This includes | 6 * This library provides internationalization and localization. This includes |
7 * message formatting and replacement, date and number formatting and parsing, | 7 * message formatting and replacement, date and number formatting and parsing, |
8 * and utilities for working with Bidirectional text. | 8 * and utilities for working with Bidirectional text. |
9 * | 9 * |
10 * For things that require locale or other data, there are multiple different | 10 * For things that require locale or other data, there are multiple different |
11 * ways of making that data available, which may require importing different | 11 * ways of making that data available, which may require importing different |
12 * libraries. See the class comments for more details. | 12 * libraries. See the class comments for more details. |
13 * | 13 * |
14 * There is also a simple example application that can be found in the | 14 * There is also a simple example application that can be found in the |
15 * `example/basic` directory. | 15 * `example/basic` directory. |
16 */ | 16 */ |
17 library intl; | 17 #library('intl'); |
18 | 18 |
19 import 'src/intl_helpers.dart'; | 19 #import('src/intl_helpers.dart'); |
20 import 'dart:math'; | 20 #import('dart:math'); |
21 import 'date_symbols.dart'; | 21 #import('date_symbols.dart'); |
22 import 'src/date_format_internal.dart'; | 22 #import('src/date_format_internal.dart'); |
23 | 23 |
24 part 'date_format.dart'; | 24 #source('date_format.dart'); |
25 part 'src/date_format_field.dart'; | 25 #source('src/date_format_field.dart'); |
26 part 'src/date_format_helpers.dart'; | 26 #source('src/date_format_helpers.dart'); |
27 part 'bidi_formatter.dart'; | 27 #source('bidi_formatter.dart'); |
28 part 'bidi_utils.dart'; | 28 #source('bidi_utils.dart'); |
29 | 29 |
30 /** | 30 /** |
31 * The Intl class provides a common entry point for internationalization | 31 * The Intl class provides a common entry point for internationalization |
32 * related tasks. An Intl instance can be created for a particular locale | 32 * related tasks. An Intl instance can be created for a particular locale |
33 * and used to create a date format via `anIntl.date()`. Static methods | 33 * and used to create a date format via `anIntl.date()`. Static methods |
34 * on this class are also used in message formatting. | 34 * on this class are also used in message formatting. |
35 * | 35 * |
36 * Message example: | 36 * Message example: |
37 * '''I see ${Intl.plural(num_people, | 37 * '''I see ${Intl.plural(num_people, |
38 * {'0': 'no one at all', | 38 * {'0': 'no one at all', |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 /** | 261 /** |
262 * Accessor for the current locale. This should always == the default locale, | 262 * Accessor for the current locale. This should always == the default locale, |
263 * unless for some reason this gets called inside a message that resets the | 263 * unless for some reason this gets called inside a message that resets the |
264 * locale. | 264 * locale. |
265 */ | 265 */ |
266 static String getCurrentLocale() { | 266 static String getCurrentLocale() { |
267 if (_defaultLocale == null) _defaultLocale = systemLocale; | 267 if (_defaultLocale == null) _defaultLocale = systemLocale; |
268 return _defaultLocale; | 268 return _defaultLocale; |
269 } | 269 } |
270 } | 270 } |
OLD | NEW |