Localize Strings in Javascript

前端 未结 12 1495
长发绾君心
长发绾君心 2020-11-28 05:52

I\'m currently using .resx files to manage my server side resources for .NET.

the application that I am dealing with also allows developers to plugin Ja

12条回答
  •  执念已碎
    2020-11-28 06:03

    I would use an object/array notation:

    var phrases={};
    phrases['fatalError'] ='On no!';
    

    Then you can just swap the JS file, or use an Ajax call to redefine your phrase list.

提交回复
热议问题