Skip to content

Repository files navigation

Translation & Internationalization Starter Kit

Ships with English and German. Supports translations for any language. Built with CE.SDK by IMG.LY, runs entirely in the browser with no server dependencies.

Documentation

Translation & Internationalization starter kit showing locale switching interface

Getting Started

Clone the Repository

git clone https://github.com/imgly/starterkit-translation-internationalization-react-web.git
cd starterkit-translation-internationalization-react-web

Install Dependencies

npm install

Download Assets

CE.SDK requires engine assets (fonts, icons, UI elements) served from your public/ directory.

curl -O https://cdn.img.ly/packages/imgly/cesdk-js/$UBQ_VERSION$/imgly-assets.zip
unzip imgly-assets.zip -d public/
rm imgly-assets.zip

Run the Development Server

npm run dev

Open http://localhost:5173 in your browser.

Locale Switching

The key feature of this starterkit is dynamic locale switching. The editor UI updates instantly when you switch languages.

Switching Locales Programmatically

// Switch to German
cesdk.i18n.setLocale('de');

// Switch to English
cesdk.i18n.setLocale('en');

Adding Custom Translations

cesdk.i18n.setTranslations({
  de: {
    'common.save': 'Speichern',
    'common.cancel': 'Abbrechen',
    'myCustomKey': 'Mein benutzerdefinierter Text'
  },
  en: {
    'myCustomKey': 'My custom text'
  }
});

Supported Locales

CE.SDK includes built-in translations for:

  • English (en)
  • German (de)

See Localization for adding more languages.

Configuration

Loading Content

Load content into the editor using one of these methods:

// Create a blank design canvas
await cesdk.createDesignScene();

// Load from a template archive
await cesdk.load('https://example.com/template.zip');

// Load from a scene file
await cesdk.load('https://example.com/scene.json');

// Load from an image
await cesdk.createFromImage('https://example.com/image.jpg');

See Open the Editor for all loading methods.

Theming

cesdk.ui.setTheme('dark'); // 'light' | 'dark' | 'system'

See Theming for custom color schemes and styling.

Architecture

src/
├── app/                          # Demo application
├── imgly/
│   ├── config/
│   │   ├── actions.ts                # Export/import actions
│   │   ├── features.ts               # Feature toggles
│   │   ├── i18n.ts                   # Translations
│   │   ├── plugin.ts                 # Main configuration plugin
│   │   ├── settings.ts               # Engine settings
│   │   └── ui/
│   │       ├── canvas.ts                 # Canvas configuration
│   │       ├── components.ts             # Custom component registration
│   │       ├── dock.ts                   # Dock layout configuration
│   │       ├── index.ts                  # Combines UI customization exports
│   │       ├── inspectorBar.ts           # Inspector bar layout
│   │       ├── navigationBar.ts          # Navigation bar layout
│   │       └── panel.ts                  # Panel configuration
│   └── index.ts                  # Editor initialization function
└── index.tsx                 # Application entry point

Key Capabilities

  • Dynamic Locale Switching – Change editor language in real-time
  • Text Editing – Typography with fonts, styles, and effects
  • Image Placement – Add, crop, and arrange images
  • Shapes & Graphics – Vector shapes and design elements
  • Templates – Start from pre-built design templates
  • Multi-Page – Create multi-page documents
  • Export – PNG, JPEG, PDF with quality controls

Prerequisites

  • Node.js v22+ with npm – Download
  • Supported browsers – Chrome 114+, Edge 114+, Firefox 115+, Safari 15.6+

Troubleshooting

Issue Solution
Editor doesn't load Verify assets are accessible at baseURL
Assets don't appear Check public/assets/ directory exists
Watermark appears Add your license key
Locale not switching Ensure you're calling cesdk.i18n.setLocale() with a valid locale code

Documentation

For complete integration guides and API reference, visit the Localization Documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with CE.SDK by IMG.LY

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages