Does twitter typeahead js support non-english language? Like Chinese, Japanese, Korean, German?
I noticed in the official documentation it supports Arabic, but I'm not sure if it supports Chinese or other non-English languages. I've tried with some Chinese, Koreans and even Arabic but none of them work.
var predefined = new Bloodhound({
name: 'predefined',
// local: [{ name: 'gvc', typeaheadkind:'predefined'}, { name: 'meeting',typeaheadkind:'predefined' }, { name: 'huddle',typeaheadkind:'predefined' }],
local: data_list,
datumTokenizer: function(d) {
return Bloodhound.tokenizers.whitespace(d.name);
},
queryTokenizer: Bloodhound.tokenizers.whitespace
});
predefined.initialize();
var originalname = new Bloodhound({
name: 'originalname',
local: [{ name: 'Ψ§ΩΨ₯ΩΨ¬ΩΩΨ²ΩΨ©', typeaheadkind:'predefined'}, { name: 'μ‘μ§ν¨',typeaheadkind:'predefined' }, { name: 'ηΉε«ηζδΈ',typeaheadkind:'predefined' }],
// local: data_list,
datumTokenizer: function(d) {
return Bloodhound.tokenizers.whitespace(d.name);
},
queryTokenizer: Bloodhound.tokenizers.whitespace
});
originalname.initialize();
var typeaheadoption =[
{
name: 'predefined',
displayKey: 'name',
source: predefined.ttAdapter()
},
{
name: 'originalname',
displayKey: 'name',
source: originalname.ttAdapter()
}
]
$('#searchbox').typeahead(null, typeaheadoption);
+3
source to share
No one has answered this question yet
Check out similar questions: