refactor use a function rather than the arraye to access the localize la...

...bel

It was supposed to be a bug but in fact, there are no bugs. So i just take the chance of this feature to refactor the javascript file to use the function rather than the array to access the localized tags.