Skip to content

How to load multiple json files in a .html file? #232

@Bojan996

Description

@Bojan996

So i thought making separate translation files for each .js file that i have cause they are very big. So in my html page my code looks like this:

<script > $.i18n().locale = 'en'; $.i18n().load( ["i18n/access.json", "i18n/example.json", "i18n/index.json"] ).done( () => $('[data-i18n]').i18n() ); </script>

Obviously this array import method does not work, so how can i do this?

Also while im here, is there a more effective way of getting the html tags translate tan the method in the .done block?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions