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 * ## Installing ## |
| 11 * |
| 12 * Use [pub][] to install this package. Add the following to your `pubspec.yaml` |
| 13 * file. |
| 14 * |
| 15 * dependencies: |
| 16 * intl: any |
| 17 * |
| 18 * And then run `pub install`. |
| 19 * |
10 * For things that require locale or other data, there are multiple different | 20 * For things that require locale or other data, there are multiple different |
11 * ways of making that data available, which may require importing different | 21 * ways of making that data available, which may require importing different |
12 * libraries. See the class comments for more details. | 22 * libraries. See the class comments for more details. |
13 * | 23 * |
14 * There is also a simple example application that can be found in the | 24 * There is also a simple example application that can be found in the |
15 * `example/basic` directory. | 25 * `example/basic` directory. |
| 26 * |
| 27 * [pub]: http://pub.dartlang.org |
16 */ | 28 */ |
17 library intl; | 29 library intl; |
18 | 30 |
19 import 'dart:async'; | 31 import 'dart:async'; |
20 import 'src/intl_helpers.dart'; | 32 import 'src/intl_helpers.dart'; |
21 import 'dart:math'; | 33 import 'dart:math'; |
22 import 'date_symbols.dart'; | 34 import 'date_symbols.dart'; |
23 import 'src/date_format_internal.dart'; | 35 import 'src/date_format_internal.dart'; |
24 import "number_symbols.dart"; | 36 import "number_symbols.dart"; |
25 import "number_symbols_data.dart"; | 37 import "number_symbols_data.dart"; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 * unless for some reason this gets called inside a message that resets the | 285 * unless for some reason this gets called inside a message that resets the |
274 * locale. | 286 * locale. |
275 */ | 287 */ |
276 static String getCurrentLocale() { | 288 static String getCurrentLocale() { |
277 if (_defaultLocale == null) _defaultLocale = systemLocale; | 289 if (_defaultLocale == null) _defaultLocale = systemLocale; |
278 return _defaultLocale; | 290 return _defaultLocale; |
279 } | 291 } |
280 | 292 |
281 toString() => "Intl($locale)"; | 293 toString() => "Intl($locale)"; |
282 } | 294 } |
OLD | NEW |