Product
File Formats
File formats supported by Babelize for translation.
Babelize works with the most common localization file formats. When Babelize scans your React or Next.js repository, it detects and translates these formats automatically.
Supported Formats
| Format | Extension | Common Use |
|---|---|---|
| JSON | .json | React, Next.js, web apps |
| YAML | .yaml, .yml | Configuration, static sites |
| Markdown | .md, .mdx | Documentation |
JSON
The most common format for web application localization.
Flat structure:
{
"greeting": "Hello",
"farewell": "Goodbye"
}Nested structure:
{
"messages": {
"greeting": "Hello",
"farewell": "Goodbye"
}
}- Keys are preserved exactly
- Numeric and boolean values are not translated
- Null values are preserved
YAML
messages:
greeting: Hello
farewell: Goodbye- Comments preserved
- Multi-line strings maintain format
- Indentation preserved
Markdown
Babelize translates text content while preserving structure:
Translated: headings, paragraphs, list items, blockquotes, table cells, image alt text
Preserved: code blocks, HTML tags, link URLs, frontmatter
Placeholder Protection
Babelize automatically detects and protects common placeholder patterns:
| Pattern | Example |
|---|---|
| ICU MessageFormat | {name}, {count, plural, ...} |
| Printf-style | %s, %d, %@ |
| Template literals | ${variable} |
| Handlebars/Mustache | {{variable}} |
| React i18next | <1>text</1> |
Encoding
All files must be UTF-8 encoded. Other encodings are converted automatically with a warning.