Language and Translations
Chat24plus is fully multilingual and provides powerful features to detect the user's language on the fly.
Edit translations
To edit the languages of both chat and admin, go to Settings > Translations. Some settings, such as e-mail contents, are directly translatable and therefore do not need to be translated here.
Chat language
Chat24plus is already translated into 41 languages. There are many options available to set the language:
- OPTION 1 Go to Settings > Chat and check the Translate automatically option. This feature will automatically use the chat language of the user's browser.
- OPTION 2 - PHP ONLY Add the URL parameter lang=LANGUAGE-CODE to the script that loads the chat, replacing "LANGUAGE-CODE" with the two-letters language code you would like to display. Example: https://chat24plus.com/js/main.js?lang=en. Go to wikipedia.org/wiki/List_of_ISO_639-1_codes for the complete languages code list (see column 639-1).
- OPTION 2 - WORDPRESS ONLY Go to Settings > WordPress and set the option Force language.
- OPTION 3 - WORDPRESS ONLY The WordPress version of Chat24plus uses the default language of the WordPress installation; or the language of the current page or post if the website is multilingual. This feature is compatible with WPML, Polylang, and other multilingual plugins. Note: This feature is automatically disabled if the option Chat > Translate automatically is active.
Admin language
To translate the admin area follow the steps below:
- Translate the texts in your language from the Settings > Translations.
To set the admin area language you have three options:
- Activate the option Settings > Admin > Automatically translate admin area. This feature automatically translate the admin area to match the agent profile language or the agent browser language.
- Edit the file config.php inside your Chat24plus installation directory and Enter the code
define('SB_ADMIN_LANG', 'LANGUAGE-CODE');at the end of the file content. Replace LANGUAGE-CODE with the language code of the language you want to use, use only 2 letters, for example, insert only es, not es_ES.
Translate custom contents
You can translate almost any custom content: rich messages, titles, descriptions, automatic messages, chat header, and more. To add translations, select the language you want and click the New translation button.
Add a new language
To add a new language, follow the steps below:
- Via FTP or a File Manager, go to chat24plus\resources\languages\front.
- Duplicate (copy and paste it in the same directory) the chat24plus\resources\languages\front\source.json file.
- Rename the file with the language code you would like to add. Go to wikipedia.org/wiki/List_of_ISO_639-1_codes for the complete languages code list (see column 639-1).
- Go to Settings > Translations and the new language should appear automatically.
To add a new language for the admin area, follow the exact same steps, but use folder admin instead. New languages will not be lost or deleted on plugin updates.
Information
- If a translation string is missing, add it by clicking the button Add new translation.
- If a translation string is not working, make sure to remove all white spaces and break lines at the start and the end of the string.
- The translations edits are not saved in the database but directly in the translation files. When a translation is edited, and saved, a backup is created into the uploads folder. The backup is restored automatically on plugin update and plugin activation.
- Some special chars like & are replaced by the HTML equivalent code (see https://www.w3schools.com/html/html_entities.asp). Ex. & is replaced by &
- You can add missing translation strings also by code. Edit the language files located in chat24plus\resources\languages. Once you edited a file, the new strings will appear in Settings > Translations.