# Exploring the Dominance of the English Language on the Websites of EU Countries
## 3 Methodology
### Inferring Main and Other Languages
\begin{table}
\begin{tabular}{c c} \hline \hline
**Rule Priority** & **Rule** \\ \hline Rule 1 & If both the lang attribute of the HTML tag and the PHP detected language were the same, set the page’s language as that value \\ Rule 2 & If both the lang attribute of the HTML tag and the PHP detected language were equivalent according to the Notation Equivalence List, set the page’s language as the ISO 639-1 value for the primary language. \\ Rule 3 & If both the CLD2 detected language and either the lang attribute of the HTML tag or the PHP detected language were equivalent according to the Notation Equivalence List, set the page’s language as the ISO 639-1 value for the primary language. \\ Rule 4 & If both the CLD2 detected language and either the lang attribute of the HTML tag or the PHP detected language were English, set the page’s language as the ISO 639-1 value for English. \\ Rule 5 & If the lang attribute of the HTML tag is English but the PHP detected language is equivalent to the primary language, set the page’s language as the ISO 639-1 value for the primary language. \\ Rule 6 & If the lang attribute of the HTML tag is not empty and is a valid ISO 639-1 notation, set the page’s language as that value. \\ Rule 7 & If the PHP detected language is equivalent to the primary language, set the page’s language as the ISO 639-1 value for the primary language. \\ Rule 8 & If the PHP detected language is English, set the page’s language as the ISO 639-1 value for English. \\ Rule 9 & If the CLD2 detected language is equivalent to the primary language, set the page’s language as the ISO 639-1 value for the primary language. \\ Rule 10 & If the CLD2 detected language is equivalent to English, set the page’s language as the ISO 639-1 value for English. \\ Rule 11 & If the PHP detected language is not empty and the page is a Fontpage set the page’s language as the detected value. \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Rules used in LIA to infer the language of a webpage. \begin{table}
\begin{tabular}{c c} \hline \hline
**Country** & **Primary Language Notation** \\ \hline Austria & de, deu, at \\ Belgium & nl, nld, be \\ Bulgaria & big, bul \\ Croatia & hr, hrv, bs, sr \\ Cyprus & el, ell, gr, cy \\ Czechia & cs, ces, cz \\ Denmark & da, dan, dk \\ Estonia & et, est, ee \\ Finland & fi, fin \\ France & fr, fra \\ Germany & de, deu \\ Greece & el, ell, gr \\ Hungary & hu, hun \\ Ireland & ga, gle \\ Italy & it, ita \\ Latvia & lv, lav \\ Lithuania & lt, lit \\ Luxemburg & fr, fra \\ Malta & mt, mlt \\ Netherlands & nl, nld \\ Poland & pl, pol \\ Portugal & pt, por \\ Romania & ro, ron \\ Slovakia & sk, slk \\ Slovenia & sl, slv, si \\ Spain & es, spa \\ Sweden & sv, swe, se \\ United Kingdom & en, eng \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Language notations used per countries. The HTML tag lang attribute is highly valued when deliberately stated by the webpage's creator. An exception to this is embodied by rule 5. When the HTML tag lang attribute is set as English, but the detected language is the primary language of each country, the detected language is preferred (Rule 5). This was intentionally implemented because several popular CMS set the lang attribute to English by default without any regard to the page's actual content. In contrast, the lang attribute was used to infer the language of a page when the lang attribute was explicitly stated in the HTML tag as something other than English, as this clearly indicated the purpose of the website's developers. When the lang attribute is empty and the PHP detected language is not the country's primary language, a combination of the CLD2 detected language and PHP detected language is used to infer the page's language. In this process (rules 7-10), the PHP detected language is trusted more for the reasons mentioned above. If the only information available to us after the crawling process is the PHP detected language, then it is only trusted in the case of a frontpage.