Translate "The Interactive Book of Prompting" chapters and UI strings to a new language
This skill guides translation of book content for The Interactive Book of Prompting at prompts.chat.
The book has 25 chapters across 7 parts. Translation requires:
src/content/book/{locale}/messages/{locale}.jsonBefore starting, identify:
de, fr, es, ja, ko, zh)messages/ directorysrc/content/book/{locale}/ folder existsThe Turkish (tr) translation is complete and well-tested. Copy it as your starting point instead of translating from English:
mkdir -p src/content/book/{locale}
cp -r src/content/book/*.mdx src/content/book/{locale}/
cp src/components/book/elements/locales/en.ts src/components/book/elements/locales/{locale}.ts
⚠️ IMPORTANT: After copying, you MUST register the new locale in src/components/book/elements/locales/index.ts:
import {locale} from "./{locale}";locales object: {locale},export { en, tr, az, {locale} };This is faster because:
Edit each copied file in src/content/book/{locale}/ to translate from Turkish to your target language.
Process files one by one:
| Slug | English Title |
|---|---|
00a-preface | Preface |
00b-history | History |
00c-introduction | Introduction |
01-understanding-ai-models | Understanding AI Models |
02-anatomy-of-effective-prompt | Anatomy of an Effective Prompt |
03-core-prompting-principles | Core Prompting Principles |
04-role-based-prompting | Role-Based Prompting |
05-structured-output | Structured Output |
06-chain-of-thought | Chain of Thought |
07-few-shot-learning | Few-Shot Learning |
08-iterative-refinement | Iterative Refinement |
09-json-yaml-prompting | JSON & YAML Prompting |
10-system-prompts-personas | System Prompts & Personas |
11-prompt-chaining | Prompt Chaining |
12-handling-edge-cases | Handling Edge Cases |
13-multimodal-prompting | Multimodal Prompting |
14-context-engineering | Context Engineering |
15-common-pitfalls | Common Pitfalls |
16-ethics-responsible-use | Ethics & Responsible Use |
17-prompt-optimization | Prompt Optimization |
18-writing-content | Writing & Content |
19-programming-development | Programming & Development |
20-education-learning | Education & Learning |
21-business-productivity | Business & Productivity |
22-creative-arts | Creative Arts |
23-research-analysis |
<div>, <img>, className, etc. unchanged##, **bold**, *italic*, [links](url)import statements at the topIn messages/{locale}.json, translate the "book" section. Key areas:
"book": {
"title": "The Interactive Book of Prompting",
"subtitle": "An Interactive Guide to Crafting Clear and Effective Prompts",
"metaTitle": "...",
"metaDescription": "...",
...
}
book.chapters)"chapters": {
"00a-preface": "Preface",
"00b-history": "History",
"00c-introduction": "Introduction",
...
}
book.chapterDescriptions)"chapterDescriptions": {
"00a-preface": "A personal note from the author",
"00b-history": "The story of Awesome ChatGPT Prompts",
...
}
book.parts)"parts": {
"introduction": "Introduction",
"foundations": "Foundations",
"techniques": "Techniques",
"advanced": "Advanced Strategies",
"bestPractices": "Best Practices",
"useCases": "Use Cases",
"conclusion": "Conclusion"
}
book.interactive.demoExamples)Localize example text for demos (tokenizer samples, temperature examples, etc.):
"demoExamples": {
"tokenPrediction": {
"tokens": ["The", " capital", " of", " France", " is", " Paris", "."],
"fullText": "The capital of France is Paris."
},
"temperature": {
"prompt": "What is the capital of France?",
...
}
}
⚠️ DO NOT SKIP THIS STEP - The interactive demos will not work in the new language without this.
Translate the locale data file at src/components/book/elements/locales/{locale}.ts:
Then register it in src/components/book/elements/locales/index.ts:
import {locale} from "./{locale}";
const locales: Record<string, LocaleData> = {
en,
tr,
az,
{locale}, // Add your new locale here
};
export { en, tr, az, {locale} }; // Add to exports
book.interactive.*, book.chapter.*, book.search.*)Translate all interactive component labels and navigation strings.
Run the check script:
node scripts/check-translations.js
Start dev server and test:
npm run dev
Navigate to /book with the target locale to verify content loads
The English (en) translation is complete and serves as the base template for all new translations:
src/content/book/*.mdx — copy this files to src/content/book/{locale}/*.mdxmessages/en.json → book section — use as reference for structuresrc/content/book/*.mdx to src/content/book/{locale}/*.mdx"book" section from messages/en.json to messages/{locale}.json. Translate these in multiple agentic session instead of single time (token limit may exceed at once)| Research & Analysis |
24-future-of-prompting | The Future of Prompting |
25-agents-and-skills | Agents & Skills |