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





All Articles