Knockout-Localization-Binding icon indicating copy to clipboard operation
Knockout-Localization-Binding copied to clipboard

Observable locale

Open leandromacrini opened this issue 10 years ago • 0 comments

It would be helpful if "locale" was an observable. In this way the locale can also be changed at run-time.

To do this just change the source file at line 88 with the following line: var text = item[ko.unwrap(locale)] || item['default'] || "";

Locale will be declared in this way in the resource file: var locale = ko.observable ("en");

leandromacrini avatar Jun 11 '15 13:06 leandromacrini