12. The non-transitory machine-readable medium of claim 3 , wherein, when the contents of the resource satisfy the at least one text threshold, the operations further comprise: calculating a language score for each language in the plurality of languages based on the numbers of language units, wherein automatically setting the input language for the resource based on the domain history comprises automatically selecting the input language for the resource based on the calculated language scores.
3. A non-transitory machine-readable medium comprising instructions stored therein, which when executed by a machine, cause the machine to perform operations comprising: loading a resource in a user interface; determining whether contents of the resource have textual information that satisfies at least one text threshold; when the contents satisfy the at least one text threshold: accessing a domain history corresponding to a domain of the resources loaded in the user interface, wherein the domain history contains a feature vector for each of one or more active resources visited by a user and belonging to the domain, the one or more active resources are resources that were loaded for viewing in a user interface by the user for longer than a minimum time threshold and less than a maximum time threshold, the feature vector comprises a data structure that specifies a plurality of languages and numbers of language units found in the respective active resource, the plurality of languages and the numbers of language units being based on content of the respective active resource, and each number of the numbers of language units corresponds to a number of characters or words of a respective language in the respective active resource; automatically setting an input language for the resource based on the domain history; when the contents do not satisfy the at least one text threshold: identifying a resource identifier for the resource; identifying a language corresponding to the resource identifier in a mapping table that maps a plurality of resource identifiers to a plurality of languages; and automatically sating the identified language as the input language for the resource.