Add Localization Wrapper (Free Online Tool)
Wrap string fields in localization objects while keeping the result as structured JSON
Paste your JSON → Get results instantly (no signup)
⚡ Instant resultsNo signupRuns in your browser
Try examples:
→ Add localization fields to this JSON content.
Output✓
Output✓
1{2 "title": {3 "en": "Hello",4 "fr": "",5 "es": ""6 }7}Love the result?
Use this exact pipeline in your app, backend, or LLM workflow.
No setup needed. Works with curl, Node, Python.
Uses example data. For edited input, copy from the playground.
Works with:
- API responses
- Nested JSON
- Arrays & objects
Example: input → output
Input / OutputInputOutput
Input
{ "title": "Hello"}Output
{ "title": { "en": "Hello", "fr": "", "es": "" }}Advanced usage (optional)
Add Localization Wrapper
v1.0.0Localization
objectreversible
Description
Add Localization Wrapper
Convert string fields into localized objects with support for multiple languages.
Description
This utility transforms string values into localization objects, preserving the original value as the base language and creating empty placeholders for additional languages.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Fields to localize | path-picker | required | Select which fields to convert to localized format |
| Base Language | language-select | en | The language code for the original value |
| Languages | multi-language-select | - | Additional language codes to add as placeholders |
How It Works
The utility performs these steps:
- Traverse - Walk through the entire JSON structure
- Match Path - Find the selected fields to localize
- Filter Type - Only process string values
- Wrap Value - Convert the string into an object
- Set Base Value - Set the original string under the base language key
- Set Placeholder Values - Create empty strings for each additional language
Examples
Basic Localization
Input:
{
"title": "Hello"
}Config:
targetPaths: [title]
baseLanguage: en
languages: [fr, es]Output:
{
"title": {
"en": "Hello",
"fr": "",
"es": ""
}
}Multiple Fields
Input:
{
"title": "Hello",
"description": "A greeting",
"count": 42
}Config:
targetPaths: [title, description]
baseLanguage: en
languages: [fr]Output:
{
"title": {
"en": "Hello",
"fr": ""
},
"description": {
"en": "A greeting",
"fr": ""
},
"count": 42
}Note: Non-string fields (like count) are left unchanged.
Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| Fields to localize | path-picker | (required) | |
| Based language | language-select | en | |
| Multiple languages | multi-language-select | — |
Examples
AI Prompt
Add localization fields to this JSON content.Output✓
Output✓
1{2 "title": {3 "en": "Hello",4 "fr": "",5 "es": ""6 }7}Config
Fields to localize
title
Based language
en
Multiple languages
fr, es
API Usage
POST /api/v1/utilities/localization.add-wrapper
Example:
curl -X POST https://your-domain.com/api/v1/utilities/localization.add-wrapper \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":{"title":"Hello"}},"config":{"targetPaths":["title"],"baseLanguage":"en","languages":["fr","es"]}}'Response
1{2 "title": {3 "en": "Hello",4 "fr": "",5 "es": ""6 }7}