Collections
Categories
Partners
Other
Rosetta is a very lightweight, general-purpose internationalization library. The resource files of Rosetta are typically JS files, sometimes with JS code inside texts.
Note: Rosetta allows you to store all locales in one JS object. To translate your resource files with Crowdin you would have first separate your locales to one per language. JS code inside resource files is allowed.
Attribute | Value |
---|---|
File Extension | .json, .js |
API Type | js |
Source can be edited in Crowdin | No |
Generating translated files via Bundles | Search Crowdin Store |
Supports pluralization | No |
WYSIWYG Preview in the editor | Yes |
Supported types of contextual information | WYSIWYG |
Custom attributes | No |
Existing translations import possibility | Key-value mapping (trivial) |
const i18n = rosetta({
strings: {
intro: {
welcome: 'Welcome, {{username}}!',
text: 'I hope you find this useful.',
},
bar: 'template sees "{{value}}"',
support(obj) {
let hour = Math.floor(Math.random() * 3) + 9;
let str = `For questions, I'm available on ${obj.date.toLocaleDateString()}`;
str += `, any time after ${hour}:00.`
return str;
}
}
}
Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.
Learn MoreReleased on Sep 25, 2022
Updated on Feb 23, 2024
Published by Crowdin
Identifier:rosetta