How to create a textfield with autocomplete function for the view?
I think no need to create block of view programmatically, You can do it with Views Autocomplete Filters module and views Module:
Try the following steps how to create view with language filter, using autocomplete:


Install Views Autocomplete Filters Module.
Create View with Fields Display add the language field The language of the content or translation.
 and your additional fields:

Add Combine fields filter 



configure it like the following:




the result will be like: