1. A computer-implemented method for selecting an input language for a web page, the method comprising: accessing a domain history′ corresponding to a domain of the web page loaded in a web browser, wherein the domain history contains a feature vector for each of one or more active pages visited by a user and belonging to the domain, the one or more active pages are web pages 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 page, the plurality of languages and the numbers of language units being based on content of the respective active page, 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 page; calculating a language score for each language in the plurality of languages based on the numbers of language units; and automatically selecting, using a processor, an input language for the web page from the plurality of languages based on the calculated language scores.