diff --git a/pages/11.i18n/docs.md b/pages/11.i18n/docs.md index caac35a4..034d7d4d 100644 --- a/pages/11.i18n/docs.md +++ b/pages/11.i18n/docs.md @@ -7,16 +7,13 @@ process: never_cache_twig: true --- +{% do assets.addJs('https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/i18n/es.js', 90) %} + ## Multiple languages (localization) -Select2 supports displaying the messages in different languages, as well -as providing your own -custom messages -that can be displayed. +Select2 can load message translations for different languages from language files. -The language does not have to be defined when Select2 is being -initialized, but instead can be defined in the [lang] -attribute of any parent elements as [lang="es"]. +The language does not have to be defined when Select2 is being initialized, but instead can be defined in the `[lang]` attribute of any parent elements as `[lang="es"]`.

@@ -31,11 +28,18 @@ $(".js-example-language").select2({ }); ``` + + +You may alternatively provide your own custom messages to be displayed. + + ## RTL support -Select2 will work on RTL websites if the dir attribute is -set on the <select> or any parents of it. You can also -initialize Select2 with dir: "rtl" set. +Select2 will work on RTL websites if the `dir` attribute is set on the `