Clean Up Your Browser Language Data With This

A couple of months ago I published a case statement to make your browser languages easier to read. I added more as they came in.

A Couple Of Things To Consider:

“Es” languages are English, but there are many variations. “En-ie” is Irish English and “en-gb” is United Kingdom English.

The Spanish audiences starting with “en” can be confusing as well. If you look on the top left pie chart you’ll see many that start with “en”.

In this case I called them all simply Spanish or English.

These visitors will show the preferred language, because that’s how they have their browsers set up.

If you see a high percentage of other languages you may consider targeting more, as long as you have someone who speaks the language.

CASE
WHEN REGEXP_MATCH( Language , “es.*”) THEN “Spanish”
WHEN Language = “c” THEN “Unknown”
WHEN REGEXP_MATCH( Language , “it.*|.*not-set.*”) THEN “Unknown”
WHEN REGEXP_MATCH( Language , “fa.*”) THEN “Iran”
WHEN REGEXP_MATCH( Language , “cs.*”) THEN “Czech”
WHEN REGEXP_MATCH( Language , “id.*”) THEN “Indonesian”
WHEN REGEXP_MATCH( Language , “pl.*”) THEN “Norwegian”
WHEN REGEXP_MATCH( Language , “el.*”) THEN “Greek”
WHEN REGEXP_MATCH( Language , “ro.*”) THEN “Romanian”
WHEN REGEXP_MATCH( Language , “sv.*”) THEN “Swedish”
WHEN REGEXP_MATCH( Language , “en.*”) THEN “English”
WHEN REGEXP_MATCH( Language , “fi.*”) THEN “Finnish”
WHEN REGEXP_MATCH( Language , “he.*”) THEN “Hebrew”
WHEN REGEXP_MATCH( Language , “tr.*”) THEN “Turkish”
WHEN REGEXP_MATCH( Language , “sk.*”) THEN “Slovak”
WHEN REGEXP_MATCH( Language , “bs.*”) THEN “Bosnian”
WHEN REGEXP_MATCH( Language , “ru.*”) THEN “Russian”
WHEN REGEXP_MATCH( Language , “hu.*”) THEN “Chinese”
WHEN REGEXP_MATCH( Language , “ko.*”) THEN “Korean”
WHEN REGEXP_MATCH( Language , “pt.*”) THEN “Spanish”
WHEN REGEXP_MATCH( Language , “zh.*”) THEN “Chinese”
WHEN REGEXP_MATCH( Language , “ar.*”) THEN “Arabic”
WHEN REGEXP_MATCH( Language , “fr.*”) THEN “French”
WHEN REGEXP_MATCH( Language , “vi.*”) THEN “Latvian”
WHEN REGEXP_MATCH( Language , “nl.*”) THEN “Dutch”
WHEN REGEXP_MATCH( Language , “de.*”) THEN “German”
WHEN REGEXP_MATCH( Language , “ja.*”) THEN “Japanese”
WHEN REGEXP_MATCH( Language , “uk.*”) THEN “Ukrainian”
WHEN REGEXP_MATCH( Language , “ja.*”) THEN “Japanese”
ELSE Language
END