Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Proper way to add missing localization for jTable #3501


User avatar
0
krileo created

Hi.

We are trying to add danish language, but it breaks the frontend because no localization for jTable exists in the node module.

zone.js:2176 GET <a class="postlink" href="http://localhost:4200/assets/localization/jtable/jquery.jtable.da.js?_=1499286192984">http://localhost:4200/assets/localizati ... 9286192984</a> 404 (Not Found)

Could you tell us what the proper way of adding our own localization file would be, if we wish to keep it private and not do a pullrequest on github.

/Kristian


2 Answer(s)
  • User Avatar
    0
    alirizaadiyahsi created

    Hi,

    JTable already have localization, it is enough to add just an xml that contain Danish localization texts with VALID CULTURE CODES Also, check this document: <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Angular#localization">https://aspnetzero.com/Documents/Develo ... calization</a>

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @krileo,

    If you want to add a non existing localization for jTable, first you need to add localization code here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/shared/helpers/LocalizedResourcesHelper.ts#L101">https://github.com/aspnetzero/aspnet-ze ... er.ts#L101</a> if it does not exist.

    Second, you need to create "/assets/localization/jtable/" folder and copy your localized javascript file in it. Normally angular-cli copies jTable localization files from "node_modules/jTable/..." to this folder when you publish or run your app via angular-cli.

    I haven't tried but this scenario should work. Please let us know if it does not.

    Thanks.