Skip to main content

Language and Localization

Welcome to the documentation for On-Codemerge, a versatile web editor designed for seamless integration and functionality with multi-language support.

on-CodeMerge

A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product. This intuitive tool for developers of all skill levels.


Result:

Preview:

Getting Started

Start by installing On-Codemerge in your project.

Installation

To install on-codemerge, run the following command in your project directory:

npm i --save on-codemerge

Localization

On-Codemerge supports multiple languages, making it a versatile choice for international projects. To use a specific language, use the setCurrentLanguage method in the EditorCore i18n.

Supported Locales

On-Codemerge currently supports the following locales:

  • German (de)
  • English (en)
  • Spanish (es)
  • French (fr)
  • Japanese (ja)
  • Korean (ko)
  • Portuguese (pt)
  • Russian (ru)
  • Chinese (zh)

Each language pack can be included in your project and configured as needed.

Integration Example

Here's a basic example of integrating On-Codemerge into a vanilla JavaScript project with localization support:

Initialize and Register
import EditorCore from 'on-codemerge';

document.addEventListener('DOMContentLoaded', () => {
const locale = 'de';
const appElement = document.getElementById('app');
if (appElement) {
const editor = new EditorCore(appElement);
// ... register other modules
editor.i18n.setCurrentLanguage(locale);
}
});

Each plugin adds unique functionality to the On-Codemerge editor, making it a powerful tool for web content creation and editing in various languages.