Difference between revisions of "Translating OPL Problems"

From WeBWorK_wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
   
 
For tranlating WeBWorK OPL problems, please adhere to the following conventions:
 
For tranlating WeBWorK OPL problems, please adhere to the following conventions:
* The language tag will use [https://en.wikipedia.org/wiki/ISO_639-1 ISO 639.1].
+
* The language tag will use [https://en.wikipedia.org/wiki/ISO_639-1 ISO 639.1]. So, a problem written in French would have
  +
<pre>
  +
## Language(fr)
  +
</pre>
  +
among its OPL tags.
 
* Problem files should just have one language rather than if/then's to code them up.
 
* Problem files should just have one language rather than if/then's to code them up.
 
* We recommend that problems which are translations of each other be in the same directory with the same name, but with the 639.1 label at the end, as in sr3-2.es.pg and sr3-2.fr.pg.
 
* We recommend that problems which are translations of each other be in the same directory with the same name, but with the 639.1 label at the end, as in sr3-2.es.pg and sr3-2.fr.pg.
 
* But, if you translate an existing problem, do not change the existing file name to sr3-2.en.pg since that would break existing paths.
 
* But, if you translate an existing problem, do not change the existing file name to sr3-2.en.pg since that would break existing paths.
* It is possible down the line that we may use the file name as a way of picking up languages, but we don't want to rush to that, so use a language tag, e.g. Language("fr")
+
* It is possible down the line that we may use the file name as a way of picking up languages, but we don't want to rush to that, so use a language tag, e.g. Language(fr)
* Problems without a language tag will be assumed to be English, but authors new of English language problems are encouraged to use the Language("en") tag.
+
* Problems without a language tag will be assumed to be English, but authors new of English language problems are encouraged to use the Language(en) tag.
 
 
 
[[Category:Localization]]
 
[[Category:Localization]]

Latest revision as of 12:01, 9 April 2014

For tranlating WeBWorK OPL problems, please adhere to the following conventions:

  • The language tag will use ISO 639.1. So, a problem written in French would have
## Language(fr)

among its OPL tags.

  • Problem files should just have one language rather than if/then's to code them up.
  • We recommend that problems which are translations of each other be in the same directory with the same name, but with the 639.1 label at the end, as in sr3-2.es.pg and sr3-2.fr.pg.
  • But, if you translate an existing problem, do not change the existing file name to sr3-2.en.pg since that would break existing paths.
  • It is possible down the line that we may use the file name as a way of picking up languages, but we don't want to rush to that, so use a language tag, e.g. Language(fr)
  • Problems without a language tag will be assumed to be English, but authors new of English language problems are encouraged to use the Language(en) tag.