TABLE OF CONTENTS

Localization

Localization is the feature where your agents and users can view content on Freshchat in their preferred language. As part of Localization settings, the application takes care of text (Internationalization), dates, numbers, and timestamps.


Freshchat conversations widget (web messenger)

The Freshchat conversations widget (web messenger) will be displayed based on the user’s browser language (also referred to as locale)


Supported Locales

The Freshchat conversations widget (web messenger) currently supports the following locales.


Locale name (in English)

Locale code (Mapped in Freshchat )

Arabic

ar

Catalan

ca

Chinese Mainland

zh-cn

Chinese Simplified

zh-tw

Czech

cs

Danish

da

Dutch

nl

English

en-us

Estonian

et

Finnish

fi

French

fr

German

de

Hebrew

he

Hindi

hi

Hungarian

hu

Indonesian

id

Italian

it

Japanese

ja

Korean

ko

Latvian

lv

Malay

ms

Norse

no

Polish

pl

Portuguese - Brazil

pt-br

Portuguese - Portugal

pt-pt

Russian

ru

Slovak

sk

Slovenian

sl

Spanish

es

Spanish (Latin America)

es-mx

Swedish

sv

Thai

th

Turkish

tr

Ukrainian

uk

Vietnamese

vi

Welsh

cy


When the Freshchat conversations widget (web messenger) is loaded for the first time, it automatically matches the user’s browser locale with the supported list and renders the content. For example, if the browser locale is Spanish, the header will be “Envíenos un mensaje” instead of “Message Us” on page load.


The messenger will fall back to English if the browser locale is not supported.


Locale values based on countries are different. For example, the English language has locale values ‘en-us’ for American English and ‘en-gb’ for British English. The default English locale code for Freshchat is ‘en-us’. Even if the user’s browser locale is ‘en-gb’, it will automatically map it to ‘en-us.’ This is the case for other locales too.


Note: Freshchat localization has Right-To-Left (RTL) support for Arabic and Hebrew languages


Override Options

The Messenger locale can be overridden in the following ways.


Note: To find the tracking code that you need to include before the  tag of the web pages you want to integrate, navigate to Admin Settings > Configuration and Workflows > CRM Tracking Code > Add CRM Tracking Code to your website > Copy


1. Messenger Initialization

Set “locale” property in the window.fcWidget.init function as shown below.

<script>
window.fcWidgetMessengerConfig = {
locale: "fr"
}
</script>
<script src='//fw-cdn.com/1*****7/2*****4.js' chat='true'></script>


2. User update action

You can also set the language programmatically using the setLocale function.

window.fcWidget.user.setLocale(selectedLanguage)


Make sure selectedLanguage is one of the supported locales listed in the Supported locales table.

<!--Body-->

<script src='//fw-cdn.com/1*****7/2*****4.js' chat='true'></script>


<script>
//Consider a dropdown with id #lang-btn to select the language
$('#lang-btn').on('change',function() {
var selectedLanguage = jQuery(this).val();
//Setting the Widget Locale
window.fcWidget.user.setLocale(selectedLanguage);//Replace selectedLanguage with preferred language such as ‘fr’
});
</script>
<!--Body→>


Note: If there is more than one browser locale enabled, Freshchat will always consider the default (primary) language.