Difference between revisions of "Translating OPL Problems"

From WeBWorK_wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
* 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("en")
+
* 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("") 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]]

Revision as of 12:16, 9 April 2014

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

  • The language tag will use ISO 639.1.
  • 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.