JSON Translation and French Localization Rules: Formatting, Grammar, and Best Practices

by Liam Thompson
0 comment

JSON looks tiny and serious. French can look elegant and picky. Put them together, and you get a fun little puzzle. The goal is simple. Keep the code safe. Make the French sound natural. Do not let commas, accents, or placeholders run around like squirrels.

TL;DR: Translate the text, not the JSON structure. Keep keys, placeholders, and syntax untouched. French needs special care with spaces, punctuation, gender, plurals, dates, prices, and tone. Test everything in the app, because perfect words can still break a button.

What JSON Translation Really Means

JSON is a data format. It stores text in pairs. A key points to a value. In most translation files, the key stays the same. The value gets translated.

Here is a simple example:

{
  "welcome_message": "Welcome back!",
  "save_button": "Save"
}

In French, it might become:

{
  "welcome_message": "Bon retour !",
  "save_button": "Enregistrer"
}

Notice the keys did not change. welcome_message and save_button are still in English. That is normal. Developers often use keys in code. If you translate them, the app may go boom. Not a real boom. More like a sad red error.

Rule One: Do Not Break the JSON

JSON is strict. Very strict. Like a librarian with a laser pointer.

  • Use double quotes around strings.
  • Keep commas where they belong.
  • Do not add a trailing comma after the last item.
  • Escape quotes inside text with a backslash.
  • Do not delete brackets or braces.

This is valid:

{
  "quote": "Elle a dit : \"Bonjour !\""
}

This is not valid:

{
  "quote": "Elle a dit : "Bonjour !""
}

The second example confuses JSON. It cannot tell where the text ends. So it gives up. Fair enough.

Translate Values, Protect Placeholders

Many JSON strings contain variables. They may look like this:

{
  "hello_user": "Hello, {name}!"
}

The French version should keep {name} exactly as it is:

{
  "hello_user": "Bonjour, {name} !"
}

Do not translate the placeholder. Do not add accents inside it. Do not change its case. {name} is not a word. It is a magic hole where the app puts data.

Other placeholder styles include:

  • %s
  • %d
  • {{ user }}
  • ${total}

Protect them like tiny dragons. They guard the app.

French Punctuation Has Fancy Spacing

French punctuation loves space. Not normal space everywhere. Often, it needs a non-breaking space. This keeps punctuation from jumping to a new line alone.

In French from France, add a non-breaking space before:

  • : colon
  • ; semicolon
  • ? question mark
  • ! exclamation mark

Example:

{
  "warning": "Attention : cette action est définitive !"
}

In HTML, you may see  . In plain JSON, you may use a real non-breaking space or sometimes \u00A0. Ask your team what the system supports.

French quotation marks are also special. They look like this: « Bonjour ». In France, they usually use spaces inside:

{
  "message": "Elle a répondu : « Bonjour ! »"
}

This looks tiny. It matters a lot.

Dates, Times, Numbers, and Money

Localization is not only translation. It is also format. French users expect familiar patterns.

  • Date: 31/12/2026, not 12/31/2026.
  • Time: 14:30 is common.
  • Decimal: use a comma, like 12,50.
  • Thousands: use a space, like 1 000.
  • Currency: write 12,50 € in France.

Be careful. Sometimes the app handles formats with code. In that case, do not hard-code dates or prices in JSON. Use variables instead.

{
  "price_label": "Total : {amount}"
}

This lets the system format {amount} correctly. That is cleaner. It is also less scary.

French Grammar Is Not a Copy Paste Game

English can be compact. French often needs more room. A button that says Save may become Enregistrer. A label that says Required may become Obligatoire. So far, easy.

But French has gender and agreement. That is where the fun goblin appears.

For example, “new” can be:

  • nouveau for masculine singular
  • nouvelle for feminine singular
  • nouveaux for masculine plural
  • nouvelles for feminine plural

If your string says New {item}, French may need to know what {item} is. Is it un fichier? Then use Nouveau fichier. Is it une page? Then use Nouvelle page.

Do not build French sentences by gluing random words together. It can sound like a fridge wrote poetry.

Plan for Plurals

French plurals are not always the same as English plurals. One item and many items need separate forms. Zero can also be tricky.

Bad idea:

{
  "items": "{count} item(s)"
}

Better idea:

{
  "items_one": "{count} article",
  "items_other": "{count} articles"
}

Even better, use a plural system such as ICU MessageFormat if your app supports it:

{
  "items": "{count, plural, one {# article} other {# articles}}"
}

This keeps grammar flexible. It also makes translators happier. Happy translators produce fewer mysterious comments at midnight.

Choose the Right Tone: “Tu” or “Vous”

French has two ways to say “you.” Tu is casual. Vous is formal or plural. Pick one voice and keep it everywhere.

For a banking app, use vous. For a playful game, tu may work. For a business dashboard, vous is usually safer.

Compare these:

  • Tu as gagné ! Friendly and casual.
  • Vous avez gagné ! Polite and formal.

Mixing both feels odd. It is like wearing one sneaker and one shiny dress shoe.

Watch Capitalization

French uses less title case than English. In English, you may write Account Settings. In French, it is usually Paramètres du compte, not Paramètres Du Compte.

Button labels and menu items should look natural. Do not capitalize every important word. French does not enjoy that party.

Mind French Variants

French is not the same everywhere. France, Canada, Belgium, Switzerland, and other regions have different habits.

  • fr-FR: French for France.
  • fr-CA: French for Canada.
  • fr-BE: French for Belgium.
  • fr-CH: French for Switzerland.

Some words change. Some formats change. Canadian French may prefer different terms, especially for software and business language. Always know your target locale.

Image not found in postmeta

Keep Strings Clear and Complete

Translators need context. A single word like Open can mean many things. Open a file? Open a door? Open status? French will change depending on meaning.

Add comments if your system allows them. Use clear keys too. A key like button_open_file is better than open1. Nobody loves open1. Not even open1.

Also avoid splitting sentences into small pieces. This is bad:

{
  "start": "You have",
  "middle": "{count}",
  "end": "messages"
}

French word order may differ. Keep the full sentence together when possible.

Test in the Real Interface

A translation can be correct and still fail. It may be too long for a button. It may wrap badly. It may hide behind an icon. French often takes more space than English.

So test the JSON in the app. Click around. Try long names. Try zero items. Try one item. Try many items. Try mobile screens too.

Look for:

  • Broken JSON syntax.
  • Missing placeholders.
  • Awkward line breaks.
  • Wrong punctuation spacing.
  • Gender or plural mistakes.
  • Text that feels too formal or too casual.

Best Practices Checklist

  • Keep JSON keys unchanged.
  • Translate only user-facing values.
  • Preserve placeholders exactly.
  • Use French punctuation spacing.
  • Format dates, numbers, and currency for the locale.
  • Plan for gender and plural forms.
  • Choose tu or vous and stay consistent.
  • Use natural French capitalization.
  • Give translators context.
  • Test inside the product.

JSON translation is a small craft with big impact. Good French localization makes users feel at home. It tells them the product was made with care. Keep the code clean. Keep the language human. And remember: a tiny space before an exclamation mark can be a very French act of love !

Related Posts