Skip to step content

Content in other languages

Step 4 of 5 in Content in other languages

Sample data, read from content-sdk

Codes that match in every language

Every unit in Math has a code, such as topic-a for Topic A. A code names a unit the same way in every language, so a report or another tool can find Topic A and Tema A as one unit.

Most fields belong to one language's version, as a title does. The code is different: Math marks it as shared by every language. Change a unit's code in Spanish, and the same save changes it in English; add a Spanish version, and it takes the code English has. Give it a different one, and the tools refuse.

Try it: compare the two code columns; then read what Lucía would be told on adding Lesson 5 in Spanish with a code of its own.

Loading the codes of Math's units

Adding Lesson 5 of Math in Spanish, with the code leccion-5

Lección 5 can't be added with the code leccion-5

Lesson 5's code is lesson-5, and a unit has the same code in every language. Add Lección 5 without a code, and it takes lesson-5.

What Lucía would be told on adding Lesson 5 in Spanish with a code of its own.

If you tried this

So a unit's code is the one value you can count on to match across languages. Had Lucía changed Tema A's code, Topic A's would have changed in the same save, and Topic A's history would show a saved version of its own, by Lucía, at the same moment, made by her change to Tema A. Your tools can say so as you save: “Also changed: English.”