Which strings should I translate, and which should I leave?
You will often see strings that contain things that look like computer code - these are a combination of normal English text (that you should translate) with programmer tools (that you should not translate).
Example string | Translation guideline | |
Which number is the total number of points scored in the game? [[☃ radio 1]] |
|
[[☃ radio 1]] is the placeholder for a "widget," or an interactive tool that allows the user to input an answer to a question. In this case, it is the radio (also known as multiple choice) widget. You should not translate the word "radio", or any other word that appears in the [[☃___ ]] format. |
Answered <span class="problem-count">1 problem</span> in {{translatedExerciseDisplayName}} |
|
<span class="problem-count"> is HTML markup. Do not translate it -- it's already in computer-ese. (Crowdin will helpfully remind you not to translate it) |
Last %(num)s problems |
|
%(num)s (you may also see %(num)d) is also a variable. Do not translate it. (Crowdin will helpfully remind you not to translate it.) This one's a bit more confusing because the "s" (or d) after the parenthesis is also part of the variable! |
{{#step "Chaos walk"}} |
|
{{#step "Chaos walk"}} is, again, a variable. But this time you should translate the text in quotes ("Chaos walk" in this case). Other examples of a variables that contain text that should be translated are \\red{\\text{Area}} or \\red{\\text{ group of squirrels}}. "Area" and "group of squirrels" should in this instance be translated. This is true for all variables that contain \\text{word} |
Is <var>NUM_1_VALUE</var> less than, greater than, or equal to <var>NUM_2_VALUE</var>? |
|
Text inside <var>...</var> is also a variable, and as always you should not translate it. However, this time, Crowdin does not helpfully remind you not to translate it. So we're reminding you now. Don't translate anything between <var>and </var>! |
What is <code>\\lvert <var>SIGN + INT + FRAC</var> \\rvert</code>? |
|
Text inside <code>...</code> is math markup, and you should not translate it, as mathematics is the universal language. :-) Again, Crowdin will not remind you not to translate it, so you will have to remember yourself. Our automated systems will reject any translations made inside <code>blocks, so if you think you do need to translate something inside <code>...</code>, send us an email to (i18n_support@khanacademy.org) |
{{translatedExerciseDisplayName}} |
|
{{translatedExerciseDisplayName}} is a variable. It will get replaced with the name of an exercise when this string is actually used. Do not translate it. (Crowdin will helpfully remind you not to translate it.) We did our best to name our variables so you would know what kind of content will go there |
Please do not translate non-language strings. You should just let them be. If you accidentally translate text that should not have been translated, you may be blocked from committing the string, or the problem it will be obvious as the sentences will contain some code.
Website URLs
You may change linked URLs into local versions of equivalent websites.
For example, a link to a Wikipedia article talking about Pluto would look like:
[Pluto](https://en.wikipedia.org/wiki/Pluto)
If you're translating to Spanish, the translation would look like:
[Plutón](https://es.wikipedia.org/wiki/Plut%C3%B3n_(planeta_enano))
Please use discretion when you change links. It should only be done rarely, and when there is an equivalent website in your language. If there is no equivalent website, leave the link to the English site unchanged.
Measurements and currency
We generally advise direct translations. You may localize measurements and currency while translating if you would like, but please note that the correct answer accepted for an exercise problem can't be changed. So for example, if a problem asks to add $5 and $3, the correct answer must be 8. You can change it to something like €5 + €3, because the final answer would still be 8, but you can't change it to €3 + €1 to make the prices seem more locally appropriate, because if a student enters 4 as their answer it will be marked incorrect.
Decimals
Translate decimal numbers according to the notation convention of your home country (sometimes that means comma, sometimes that means period.)
Computer science commands
The strings of the computer science section of our site are to be found in _high_prioirty_platform/computer_science.pot file. There are several tricky issues in translating this file as what appears to be English is actually javascript commands or commands from the processing.js library. So you don't need to, in fact, you shouldn't translate the commands. A command's parameters can, however, be translated. For example, if the command is background(red, green, blue), to define the background color of a screen. Then only "red", "green" and "blue" should be translated. Here is a full list of the commands: Processing.js/javascript commands.
There are also some javascript reserved words that shouldn't be translated (if, else, for, while, etc...). A full list of those reserved words can be found here. They lead to tricky strings such as: "Meet if's soulmate: else!" If and else in that string should not be translated. You can add quotes around those javascript words to make it easier - for example, you could translate it by just translating what is underlined here: "Meet the soulmate of 'if': 'else'"