Internationalization

There are only a couple of default messages built into Tom Select. To customize these messages, and internationalize (i18n) your Tom Select instances, use the render template settings.

new TomSelect('#i18n',{
create: true,
render:{
option_create: function( data, escape ){
return '<div class="create">Ajouter <strong>' + escape(data.input) + '</strong>&hellip;</div>';
},
no_results: function( data, escape ){
return '<div class="no-results">Aucun résultat trouvé</div>';
},
}
});
<select id="i18n" multiple>
<option value="">How cool is this?</option>
<option selected>amazing</option>
<option selected>awesome</option>
<option>cool</option>
<option>excellent</option>
<option>great</option>
<option>neat</option>
<option>superb</option>
<option>wonderful</option></select>

Tom Select will work on RTL websites if the dir attribute is set for the context of your Tom Select instance.

new TomSelect('#input-tags',{
persist: false,
create: true
});
<div dir="rtl">
<input type="text" id="input-tags" value="awesome,neat">
</div>
new TomSelect('#select-beast');
<select id="select-beast" placeholder="Select a person..." dir="rtl">
<option value="">Select a person...</option>
<option value="4">Thomas Edison</option>
<option value="1">Nikola</option>
<option value="3">Nikola Tesla</option>
<option value="5">Arnold Schwarzenegger</option>
</select>