Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

load is now setLocale

  • Loading branch information...
commit 1270ae8f8fca0f114005a90f3879183cff84e26e 1 parent fc93823
@OhaiBBQ authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/i18n.js
  2. +2 −2 test/test-i18n.js
View
2  lib/i18n.js
@@ -25,7 +25,7 @@ I18n.factory = function(path, language, locale, instance) {
: new I18n(arguments);
};
-I18n.prototype.load = function(language) {
+I18n.prototype.setLocale = function(language) {
this.language = (this.language !== language)
? language
: language;
View
4 test/test-i18n.js
@@ -18,8 +18,8 @@ exports["factory"]["creates a new instance if one isnt passed"] = function(test)
test.done();
}
-exports["load"] = {};
-exports["load"]["sets the locale to module.exports.all"] = function(test) {
+exports["setLocale"] = {};
+exports["setLocale"]["sets the locale to module.exports.all"] = function(test) {
var instance = i18n.factory(__dirname + "/locales");
instance.load("en");
test.equal(instance.locale, require(__dirname + "/locales/en").all);
Please sign in to comment.
Something went wrong with that request. Please try again.