tinoni / translate.js

A jQuery plugin to translate text in the client side
MIT License
87 stars 84 forks source link

capitalize translation attributes #8

Open fabianrios opened 8 years ago

fabianrios commented 8 years ago

the auto data-trn-key fail to work with Capitalize strings

fabianrios commented 8 years ago

`this.get = function(index) { var res = index; // not pretty but more functionall if (t[index]){ res = t[index][settings.lang] }else if(t[index.toLowerCase()]){ res = t[index.toLowerCase()][settings.lang] }else{ return index }

  if (res)
    return res;
  else
    return index;
};`