Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: pkg/intl/lib/src/intl_helpers.dart

Issue 11032035: Move Bidi functions into methods to make the docs look better (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/intl/lib/message_lookup_local.dart ('k') | pkg/intl/test/bidi_format_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/src/intl_helpers.dart
===================================================================
--- pkg/intl/lib/src/intl_helpers.dart (revision 13251)
+++ pkg/intl/lib/src/intl_helpers.dart (working copy)
@@ -40,4 +40,23 @@
*/
abstract class LocaleDataReader {
abstract Future read(String locale);
+}
+
+/**
+ * The internal mechanism for looking up messages. We expect this to be set
+ * by the implementing package so that we're not dependent on its
+ * implementation.
+ */
+var messageLookup = const
+ UninitializedLocaleData('initializeMessages(<locale>)');
+
+/**
+ * Initialize the message lookup mechanism. This is for internal use only.
+ * User applications should import `message_lookup_local.dart` and call
+ * `initializeMessages`
+ */
+void initializeInternalMessageLookup(Function lookupFunction) {
+ if (messageLookup is UninitializedLocaleData) {
+ messageLookup = lookupFunction();
+ }
}
« no previous file with comments | « pkg/intl/lib/message_lookup_local.dart ('k') | pkg/intl/test/bidi_format_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698