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

Unified Diff: src/extensions/experimental/i18n.js

Issue 6673011: Add v8Locale.Collator (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: final: ready for check-in Created 9 years, 8 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 | « src/extensions/experimental/experimental.gyp ('k') | src/extensions/experimental/i18n-extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/experimental/i18n.js
===================================================================
--- src/extensions/experimental/i18n.js (revision 7609)
+++ src/extensions/experimental/i18n.js (working copy)
@@ -101,3 +101,16 @@
v8Locale.prototype.v8CreateBreakIterator = function(type) {
return new v8Locale.v8BreakIterator(this.locale, type);
};
+
+// TODO(jungshik): Set |collator.options| to actually recognized / resolved
+// values.
+v8Locale.Collator = function(locale, options) {
+ native function NativeJSCollator();
+ var collator = NativeJSCollator(locale,
+ options === undefined ? {} : options);
+ return collator;
+};
+
+v8Locale.prototype.createCollator = function(options) {
+ return new v8Locale.Collator(this.locale, options);
+};
« no previous file with comments | « src/extensions/experimental/experimental.gyp ('k') | src/extensions/experimental/i18n-extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698