title: Internationalization taxonomy:
category: docs
process:
twig: true
Select2 supports displaying the messages in different languages, as well as providing your own custom messages that can be displayed.
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"]
.
$(".js-example-language").select2({
language: "es"
});
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.
$(".js-example-rtl").select2({
dir: "rtl"
});
Select2's default matcher will ignore diacritics, making it easier for users to filter results in international selects. Type "aero" into the select below.
Aeróbics Aeróbics en Agua Aerografía Aeromodelaje Águilas Ajedrez Ala Delta Álbumes de Música Alusivos Análisis de Escritura a Mano
$(".js-example-diacritics").select2();