Skip to content

set default language in v4.0 #3575

@azza0091

Description

@azza0091

In version 3.5.2 I used to initialize the plugin by setting its Language, so that every select would have automatically used the selected Language. I was doing it like this:
$.extend($.fn.select2.defaults, $.fn.select2.locales['it']);

In version 4.0.0 I've seen that I can specify the Language in every call to the select2 plugin by setting the "Language" parameter to the desired Language.
My question is: is there a way, in version 4.0.0, to set the default Language once so that it would be common to all select2 that will be created? Like I was doing in version 3.5.2

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