10 comments

[ 4.0 ms ] story [ 33.1 ms ] thread
I reckon one of the strings is server generated. I used to do similar things when I just stared coding.
Go to healthcare.gov/es and the condition is if('es' == 'en'){} That's all ...
If I go there it takes me to cuidadodesalud.gov/es. If I go to cuidadodesalud.gov/en it takes me to cuidadodesalud.gov/es/en which gives an error 404 saying it cannot find the page 'https://cuidadodesalud.gov/es/en' in HealthCare.gov. It doesn't make much sense to redirect to a different domain name and append the '/es'
And worse, that particular mess is commented out, yet downloaded to everyone's browser.

But below, in live code, they have the same thing.

On of the 'en's its generated by backend, so this is not always true as users may be from different country.
that is just their way of telling the client-side javascript about 'en' or 'es' etc . Bad design I guess.
No etc. If 'en' is not 'en' then it's assumed to be 'es_MX'
The best of the terrible js code's I have ever encountered.
Maybe its a place holder for future implementations