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
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:
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.