Skip to content
Skillpedia
Websites & UI (frontend)75k · #3062

translation-strings

What it does

This skill checks how text is prepared for translation in a software project. It is for developers getting an app ready for more than one language.

When to use it

  • ✓When a project joins text and numbers together to build translated sentences.
  • ✓When setting up a translation library for a new app.
  • ✓When preparing user-facing text in a codebase for a new language.

Skill link

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/translation-strings/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/translation-strings/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“My app builds sentences in code like 'Found ' + count + ' results'. How do I make these translatable?”

5 new skills a week. 1 minute to read.

How it works

The agent finds sentences built from pieces of text and replaces them with one message that has named placeholders. Plural forms are then handled by the translation library.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Write internationalisation-friendly translation strings

Naive string concatenation produces untranslatable sentences because word order varies dramatically across languages. A pattern like "Found " + count + " results" cannot be translated correctly into languages where the number appears in a different position or where the noun form changes depending on the count. Bad i18n strings force translators to work around developer mistakes — or simply leave content untranslated.

Quick Reference

  • Never concatenate translated strings with variables — use named placeholders
  • Use ICU MessageFormat for pluralisation, gender, and select patterns
  • Keep translation keys descriptive and scoped to their feature context
  • Extract all user-visible strings — do not hardcode any copy in components

Check

Check whether translation strings use proper message formatting with placeholders rather than string concatenation.

Fix

Replace concatenated translation strings with ICU message format patterns and ensure pluralisation is handled via the library, not conditionals.

Explain

Explain why string concatenation breaks translations and how ICU MessageFormat handles variable word order, pluralisation, and gender.

Code Review

Review components and utility functions for hardcoded user-visible strings, string concatenation involving translated text, and missing plural forms.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/javascript/translation-strings

FAQ

What is ICU MessageFormat?

It is a standard way to write translatable messages that include numbers, plurals and gender.

Why not join text pieces together?

Word order differs between languages, so joined pieces often cannot be translated correctly.

What about text written directly in components?

The skill says all user-visible text should be pulled out into translation files, not written directly in components.

Details

Original description by the author

Use when reviewing a codebase for internationalisation readiness, setting up an i18n library, or preparing strings for a new locale.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#3062
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills