Fixed typos and style issues
Use getUserAgentLocale() to access user locale
Refactor to avoid unnecessary use of locale strings
Use double quotes for string literals