2. A system for selecting an input language, the system comprising: one or more processors; and a machine-readable medium comprising instructions stored therein, which when executed by the one or more processors, cause the one or more processors to perform operations comprising: accessing a domain history corresponding to a domain of an online resource loaded in a web browser, 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 online resources that were loaded for viewing in the web browser 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; calculating a language score for each language in the plurality of languages based on the numbers of language units; and automatically selecting an input language for the online resource from the plurality of languages based on the calculated language scores.
2. A system for selecting an input language, the system comprising: one or more processors; and a machine-readable medium comprising instructions stored therein, which when executed by the one or more processors, cause the one or more processors to perform operations comprising: accessing a domain history corresponding to a domain of an online resource loaded in a web browser, 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 online resources that were loaded for viewing in the web browser 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; calculating a language score for each language in the plurality of languages based on the numbers of language units; and automatically selecting an input language for the online resource from the plurality of languages based on the calculated language scores. 11. The system of claim 2 , wherein the operations further comprise: loading the online resource in the web browser; and determining whether contents of the online resource have textual information that exceeds at least one text threshold, wherein the accessing, the calculating, and the selecting are performed when the contents of the online resource have textual information that exceeds at least one text threshold.