Introduction Version v3 / Last updated: October 8, 2026
Welcome to the Conword manual for Conword v3 (live since September 2027)
. On this page, you'll find answers to common questions and everything you need to get Conword up and running on your website or your client's website.
The list of currently available languages and their language codes ("en," "fr," "de," ...) can be found here: https://conword.io/sprachen/
Prerequisites
The front end of Conword is written in plain JavaScript, so it does not rely on any frameworks. Although it does not depend on third-party code, it works well with jQuery and other commonly used tools.
Conword provides real-time translations without storing any data on the client's server. This makes Conword independent of the underlying CMS.
Summary:
Conword works with any CMS on any server.
Installation
To run Conword, you need to include the basic JavaScript setup, as described in the next section. Once the basic JavaScript has loaded, several functions and objects will be available.
Basic Setup
Embed the JavaScript code in your HTML
Conword works on your website with this single line of code:
Disables the rtl attribute in the <html> tag if a language with the rtl feature is used (e.g., Arabic). Conword automatically sets <html lang="rtl"> if this option is not set to false.</html></html>
false
true, false
disable_language_switcher
If you install Conword, a drop-down menu for selecting and switching languages will appear in the bottom-left corner. Setting `disable_language_switcher` to `true` will remove the drop-down menu.
false
true, false
ai_notification
Informs your visitors that the translated content was generated by AI (available since Conword 3.3).
The notification is displayed upon the first translation and only once per browser (Conword stores this in local storage). false
: no notification (default, even if the option is missing). "top"
: A dismissable notification bar is displayed at the top of the page. It remains visible while scrolling until the visitor closes it. ""modal"
: A modal dialog opens, which the visitor must confirm.
The notification text is inserted in your site’s source language (German or English; other source languages display the English text) right before the translation begins, so it is translated by Conword into the selected language along with the rest of the page. It specifies your site’s original language. See AI Notification
.
false
false, "top", "modal"
skip_classes
Additional HTML classes that exclude an element and all its children from translation, just like the built-in class "cnw_skip_translation" (see Excluding Content
). This is useful if your CMS already marks such content with its own class, such as "no-translate" or "legal-text.
" You can pass a single class as a string, multiple classes as an array, or a space-separated string.
Example: Disabling the default language switcher widget
<script>
var conword_config={
disable_language_switcher:true
};
</script>
<script id="conword-root" charset="utf-8" src="https://static.conword.io/js/v2/[client-id]/conword.js"></script>
AI Notification
Some websites are required to inform their visitors that the content they are reading was generated by AI. With the ai_notification option, Conword automatically displays such a notification when the page is translated for the first time.
The notification is displayed once per browser (Conword stores this in local storage). The text is inserted in your site's source language (German or English; other source languages display the English text) right before the translation begins, so it is translated along with the rest of the page. It specifies your site's original language.
Option values
false – no notification. This is the default, even if the option is missing from your configuration.
"top" – A dismissible notification bar is inserted at the top of the page. It remains at the top of the viewport while the user scrolls, until the visitor closes it.
"modal" – A modal dialog box opens, which the visitor must confirm.
Notification bar at the top of the page
The visitor can close the bar by clicking the "✕":
<script>
var conword_config={
ai_notification:"top"
};
</script>
<script id="conword-root" charset="utf-8" src="https://static.conword.io/js/v2/[client-id]/conword.js"></script>
Modal dialog
The visitor must confirm the dialog:
<script>
var conword_config={
ai_notification:"modal"
};
</script>
<script id="conword-root" charset="utf-8" src="https://static.conword.io/js/v2/[client-id]/conword.js"></script>
Displaying the notification again
If you want to display the notification again (e.g., on a "more information" link), use Conword.show_ai_notification(). The "Conword:ai_notification_shown" event is triggered whenever the notification is displayed.
Styling
The notification bar has the ID "cnw_ai_notification," and the modal dialog has the ID "cnw-ai-dialog." Both have the class "cnw_ai_notification," so you can customize their appearance using your own CSS.
If you want to incorporate Conword functionality into your design, you can use the Conword JavaScript API. To use the API, simply include the conword.js file on your page. See Basic Setup
API Endpoint
You can use the "Conword" JavaScript object to call API methods. See the section below for more information.
API Methods
Conword.translate(language_key)
Starts the translation process.
This is probably the most important function you'll need.
Note: When calling Conword.translate, Conword.set_user_language() is also called, automatically saving the language to local storage.
The following example translates the current page into Spanish:
Conword.translate('es');
Conword.retranslate()
There are some websites where content is dynamically added to the page. While Conword is well aware of this and monitors the changes, sometimes issues arise and the translations need to be regenerated.
The retranslate method attempts to translate the page once again into the selected language.
If the page has not been translated before, this method will do nothing.
Example:
Conword.retranslate();
Conword.set_user_language(language_key)
This method saves the user's language to local storage. It is automatically called when Conword.translate() is triggered.
Use this function only when you want to save the user's language without translating the page.
Once the user's language is set, Conword will automatically translate the page the next time it is loaded.
The following example sets the user storage to Spanish:
Conword.set_user_language('es');
Conword.unset_user_language()
Resets (clears) the user language settings.
Example:
Conword.unset_user_language();
Conword.get_current_language()
This method returns the current language key (e.g., 'en', 'es', or 'fr').
Example:
var current_langauge = Conword.get_current_language();
Conword.get_available_languages()
This method returns the JavaScript language object (see Language Object).
var language_data = Conword.get_available_languages();
Conword.show_ai_notification(mode)
Displays the AI notification (see the ai_notification option in Setup Options) right away, regardless of whether it has already been displayed or whether the option is enabled at all.
The optional "mode" parameter can be "top" or "modal." If it is omitted, the mode specified in your conword_config is used ("top" if the option is not set).
The notification text (in German or English, depending on your site's source language) is inserted into the page. If the page has already been translated, Conword also translates the notification into the current language.
Example:
Conword.show_ai_notification('modal');
Conword.close_ai_notification()
Closes the AI notification bar or the AI notification modal, if one is currently displayed.
Example:
Conword.close_ai_notification();
Custom Events
Conword triggers custom events, which can be monitored using a custom EventLister.
document.addEventListener("Conword:ready", function(){
/* your code here */
});
List of Custom Events
"Conword:ready" - will be triggered when Conword is loaded and initialized.
"Conword:translation_started" - will be triggered when Conword begins translating.
"Conword:translation_done" - will be triggered when Conword has finished a translation.
"Conword:translation_failed" - will be triggered when a translation attempt fails.
"Conword:ai_notification_shown" - will be triggered when the AI notification (see the ai_notification option) has been displayed.
Language Object
The Conword API provides an object that contains all available languages and their metadata. The object can be retrieved as follows:
let languages=Conword.get_available_languages();
The object looks like this:
(Depending on the languages included with your license.)
{
"de": {
"name_en": "German",
"name_de": "Deutsch",
"name": "Deutsch",
"rtl": false,
"text_title": "Sprache wählen:",
"text_1": "Die Seite wird gerade übersetzt …",
"text_2": "Einen Moment bitte.",
"text_error": "Beim Übersetzen der Seite ist ein Fehler ist aufgetreten."
},
"en": {
"name_en": "English",
"name_de": "Englisch",
"name": "English",
"rtl": false,
"text_title": "Select language:",
"text_1": "The page is being translated ...",
"text_2": "One moment please.",
"text_error": "An error occurred while translating the page."
},
"tr": {
"name_en": "Turkish",
"name_de": "Türkisch",
"name": "Türkçe",
"rtl": false,
"text_title": "Dil seçin:",
"text_1": "Sayfa çevriliyor ...",
"text_2": "Bir dakika lütfen.",
"text_error": "Sayfa çevrilirken bir hata oluştu."
},
"it": {
"name_en": "Italian",
"name_de": "Italienisch",
"name": "Italiano",
"rtl": false,
"text_title": "Selezionare la lingua:",
"text_1": "La pagina è in corso di traduzione ...",
"text_2": "Un momento, per favore.",
"text_error": "Si è verificato un errore durante la traduzione della pagina."
}
}
Excluding Content
Forms
User input in form fields such as and
The "translate" attribute
If you want certain elements not to be translated, you can use the translate attribute. By setting its value to "no," Conword will ignore that element and all its children.
Example:
<div>
<p>I will be translated</p>
<p translate="no">
I will NOT be translated.
<small>Me neither, since my parent element uses the transate attrube.</small>
</p>
I will be translated as well
</div>
The "cnw_skip_translation" class
Conword will skip all HTML tags that contain the "cnw_skip_translation" class.
Example:
<div>
<p>I will be translated</p>
<p class="cnw_skip_translation">
I will NOT be translated.
<small>Me neither, since my parent element uses the cnw_skip_translation class.</small>
</p>
I will be translated as well
</div>
The "data-conword-skip-translation" attribute
A data attribute without a value. Conword will skip the element and all its children, just as it does with the class above. This is useful if you don't want to modify an element's classes.
Example:
<div>
<p>I will be translated</p>
<p data-conword-skip-translation>
I will NOT be translated.
<small>Me neither, since my parent element uses the data-conword-skip-translation attribute.</small>
</p>
</div>
Your own classes: the "skip_classes" option
If your CMS or template already marks content that must not be translated with its own class, you don't need to add "cnw_skip_translation" everywhere. Instead, list your classes in the skip_classes option (see Setup Options). Elements with one of these classes, and all their children, are treated exactly the same as elements with "cnw_skip_translation".
<div>
<p>I will be translated</p>
<p class="legal-text">
I will NOT be translated.
<small>Me neither, since my parent element uses one of the configured classes.</small>
</p>
</div>
Other ways
The "notranslate" class is also recognized. Scripts, stylesheets, SVG content, images, `noscript` elements, and `textarea` elements are always skipped. User input in form fields is never translated, but labels and placeholders are.
Note: Empty tags will be skipped automatically.
You can exclude entire pages by not loading Conword or by using the conword.lock() function, which is available in newer versions of Conword.
Live demo
All ways to exclude content, each with a live example: Excluding content
Examples
Dynamically excluding content with the class name ".formular_zusammenfassung"
Use the "Conword:ready" event for this type of marking: it is triggered right before a saved user language triggers the automatic translation, so the class is in place in time. "DOMContentLoaded" may be too late, because Conword itself starts on that event.
document.addEventListener("Conword:ready", function() {
var formular_zusammenfassungen = document.querySelectorAll('.formular_zusammenfassung');
for(var i = 0; i < formular_zusammenfassungen.length; i++){
formular_zusammenfassungen[i].classList.add('cnw_skip_translation');
}
});
Example: HTML link to start translating the page into English
<a href="javascript:Conword.translate('en');">Translate to english</a>
document.addEventListener("Conword:ready", function(){
my_languages=Conword.get_available_languages();
for (var langkey in my_languages) {
language_meta=my_languages[langkey];
// now you can make use of the language object - see the chapter above.
// eg: language_meta.name or language_meta.name_en ...
console.debug(language_meta.name,language_meta.name_en);
// to check if the langkey is the currently active language:
active=false;
if(Conword.get_current_language()==langkey) active=true;
// jquery example of adding menu items
$language_dropdown.append('<li><a class="'+active+'" href="javascript:start_conwordio_translation(\''+langkey+'\');" data-lang="'+langkey+'" data-langname="'+language_meta.name+'" title="Diese Seite auf \''+language_meta.name+'\' übersetzen">'+language_meta.name+'</a></li>');
}
});
// example of a wrapper to call multiple actions (translation, menu controls, tracking, ...) at the same time
function start_conwordio_translation(lang){
Conword.translate(lang);
hide_menu();
matomo_track('Translation',lang);
}
Moving the default language switch to the right using CSS
<style>
body .cnw_translationbox {
right: 30px;
left: auto;
}
</style>
Prevent all "mailto:" links from being translated using JavaScript and the cnw_skip_translation class
document.addEventListener("Conword:ready", function() {
var mailto_links = document.querySelectorAll('a[href^="mailto:"]');
for(var i = 0; i < mailto_links.length; i++){
if(mailto_links[i].innerHTML.indexOf('@')>-1) mailto_links[i].classList.add('cnw_skip_translation');
}
});
Display different images (or other content) for each language
For localization purposes, you may want to switch the content on your website when changing the language.
There are several ways to do this, such as using HTML attributes. Here is an example of how to switch images.
First, create an image with data attributes like this: