WordPress / browsehappy

101 stars 36 forks source link

Issue with capitalisation in some Turkic Languages #52

Closed eih closed 5 years ago

eih commented 5 years ago

Hi,

Some Turkic alphabets contain two variations of letter i. For example in Turkish and Azerbaijani, there are letters i and ı (notice the absence of dot on the latter). Their capital letters are different too. Capital letter for i is İ, rather than I because that is the capital letter for ı.

Browsers handle this issue well, when a lang attribute is set for the document. But on Browse Happy, capitalisation in browser names are not correct, see the image below:

Capitalisation issue in Turkish

Here, it should be MOZILLA FIREFOX, instead of MOZİLLA FİREFOX, and we have same issue with other browser names.

However, it is possible to solve this issue by setting a lang attribute for browser name h2 on this line:

<h2 lang="en"><?php echo $data->name; ?></h2>

See the result:

Proper capitalisation with lang attribute

Here we have the correct capitalisation even when lang attribute for the document is set to tr_TR.

I think as all the browser names are in English hardcoding this wouldn't be a problem.

What do you think? Is there an alternative solution?