| Index: src/extensions/experimental/i18n-extension.cc
|
| ===================================================================
|
| --- src/extensions/experimental/i18n-extension.cc (revision 7103)
|
| +++ src/extensions/experimental/i18n-extension.cc (working copy)
|
| @@ -31,6 +31,7 @@
|
| #include <string>
|
|
|
| #include "break-iterator.h"
|
| +#include "collator.h"
|
| #include "unicode/locid.h"
|
| #include "unicode/uloc.h"
|
|
|
| @@ -105,6 +106,15 @@
|
| "};"
|
| "v8Locale.prototype.v8CreateBreakIterator = function(type) {"
|
| " return new v8Locale.v8BreakIterator(this.locale, type);"
|
| + "};"
|
| + "v8Locale.Collator = function(locale, option) {"
|
| + " native function NativeJSCollator();"
|
| + " var collator = NativeJSCollator(locale, option);"
|
| + " collator.option = option;"
|
| + " return collator;"
|
| + "};"
|
| + "v8Locale.prototype.createCollator = function(option) {"
|
| + " return new v8Locale.Collator(this.locale, option);"
|
| "};";
|
|
|
| v8::Handle<v8::FunctionTemplate> I18NExtension::GetNativeFunction(
|
| @@ -127,6 +137,8 @@
|
| return v8::FunctionTemplate::New(JSDisplayName);
|
| } else if (name->Equals(v8::String::New("NativeJSBreakIterator"))) {
|
| return v8::FunctionTemplate::New(BreakIterator::JSBreakIterator);
|
| + } else if (name->Equals(v8::String::New("NativeJSCollator"))) {
|
| + return v8::FunctionTemplate::New(Collator::JSCollator);
|
| }
|
|
|
| return v8::Handle<v8::FunctionTemplate>();
|
|
|