Localization

From WeBWorK_wiki
Revision as of 16:09, 10 July 2012 by Dglin (talk | contribs) (Update progress on date and time localization)
Jump to navigation Jump to search


WeBWorK Localization project

Localizing WeBWorK means locating all of the literal strings (or phrases) which occur in the WeBWorK user interface and replacing them with pointers to a line in a separate message file. Instead of printing the string embedded in the WeBWorK code, the program will look up the appropriate line the message file and print that string. To translate WeBWorK to a new language we will only need to translate each message line in the message file -- this is much easier to do than searching all of the WeBWorK code for literal strings and then translating each one in place. The hard part is the initial step of replacing phrases by pointers.

Initially at least this project is only concerned with translating the user interface of WeBWorK, the buttons, the error messages, the graphics which contains text and so forth. The contents of the WeBWorK problems themselves will continue to be language specific and we will not try to create any mechanism for translating problems in one language into problems in a second language.

Details and progress for Localization project

  • Instructions_for_translators
  • Instructions_for_creating_language_template_files (.pot files )
  • Demo_language_courses
  • http://thales.math.uqam.ca/~labbes/blogue/ : a blog post by Sébastian Labbé about using WW and creating WW problems in French
  • Language
    • Ben Walter started this project using MakeText. (5/17/2011)
      • At the moment the language is set when the apache child starts up -- it needs to be abstracted and made configurable from Course Configuration.
      • The language can now be selected for a given course by the instructor from the choices on the Course Configuration page.
      • Adding a new language to the Course Configuration page.
        • this can only be done by an administrator who has access to the webwork software.
        • Go to the file webwork/lib/WeBWorK/Constants.pm
        • Edit (carefully) the lines near lines 141 --145
        • Important change, add new language to popup:
     values => [qw(en tr es fr zh_hk heb)]   
     -- add your language, for example for hu.po  change this line.  Do not use commas, use spaces, between the entries. 
     values => [qw(en tr es fr zh_hk heb hu)]
        • Description change:
     doc2 => 'WeBWorK currently has translations for six languages: "English en", "Turkish tr", "Spanish es", "French fr", Chinese zh_hk and Hebrew heb ',
     -- change this to
     doc2 => 'WeBWorK currently has translations for seven languages: "English en", "Turkish tr", "Spanish es", "French fr" Chinese zh_hk, Hebrew heb and Hungarian hu ',
        • At some later date we'll figure out an easier method to add a new language
  • Date and time
    • We need to be able to localize the date and time format consistently and allow it to be set in Course Configuration.
      • This is done for the dates shown to students in 2.5.1 (June 2012). It has yet to be implemented for the instructor views, which is a bigger project because the perl code parses the date assuming it is entered in a specific format.
      • It seems the Locale module should be helpful?
  • (10/13/2011) Grant He, a student at the U. of Rochester, has been working on this project over the summer. (10/13/2011)
    • Most of the modules currently in 2.50 or the trunk version of WeBWorK have had all of the strings surrounded by MakeText tags.
    • The instructor editor modules: Homework Editor, Classlist Editor, and PGProblemEditor have also been localized and can be found in the development software but have not yet been placed in the trunk version of WeBWorK because some of their CSS modifications are not yet stable. They will probably be added soon as alternate editors in the same manner as Library Browser 2
    • There are lexicons for Spanish (es.pm), Turkish (tr.pm), and French (fr.pm) -- all of them found in the current trunk version of WeBWorK. None of them are complete yet -- there are still some phrases which have not been translated, and undoubtedly translations that will need tweaking.
  • (12/10/2011) Grant He has migrated the code to use the cpan modules Locale::Maketext::Lexicon and Locale::Maketext::Simple. The main advantage is that we now have access to a wider arrange of tools for building lexicons. These are the tools compatible with the "gettext" localization project from GNU. See Instructions_for_translators.
    • The translated strings are now kept in a new file format: *.po. There are translations for Hebrew (heb), French (fr), Spanish (sp), Chinese (zh) and Turkish (tr)


  • Credits:
    • Turkish: Ben Walter, Ozcan Kasal, Middle Eastern Technical University, Northern Cyprus Campus, Northern Cyprus
    • French: Stéphanie Lanthier and Sébastien Labbé, UQAM (Université du Quebec à Montreal)
    • Spanish: Nelly Selem, IPN(national poly technical institute); David De la Rosa, Centro de investigación en matemáticas, A.C., Mexico
    • Chinese: Zhuang Hou, University of Rochester
  • David and Nelly are also creating a collection of WeBWorK questions written in Spanish
  • Stéphanie and Sébastien have written problems in French
  • Ben and others are creating problems in Turkish
  • We invite others to join. If you would like to contribute to the current lexicon in some language or begin a lexicon in a new language please contact Jason Aubrey ( aubreyja at missouri dot edu) . He can supply you with the needed files and let you know who else is working on the language. You can also view the current version of the files at http://webwork.maa.org/viewvc/system/trunk/webwork2/lib/WeBWorK/Localize/

People who have at one time or another expressed interest however mild :-) , in the localization project

  • Michael Gage, U. of Rochester, New York, USA
  • Jason Aubrey, U. of Missouri, Missouri, USA
  • David De la Rosa, Centro de Investigacion en Matematicas, Guanajuato, Gto, México
  • Martin Tamm, University of Stockholm, Stockholm, Sweden
  • Marc Buffat, Mechanical Engineering, Universite Claude Bernard Lyon 1, Lyon, France
  • Zsuzsanna Gönye, University of West Hungary, Szombathely, Hungary
  • Eva Racz, Dept. of Physics, Budapest University of Technology and Economics, Budapest, Hungary
  • Arie Poran, Ono Academi College, Israel
  • Dr. Mika Seppala, University of Helsinki, Finland
  • Benjamin Walter, Middle East Technical University, Turkey
  • Zhuang Hou, University of Rochester
  • Sébastien Labbé, UQAM (University of Quebec à Montréal), Montreal, Canada
  • Stéphanie Lanthier, UQAM, Montreal, Canada
  • Nelly Selem, IPN(national poly technical institute), Mexico
  • David de la Rosa, CIMAT (Centro de Investigacion en Matematicas), Mexico


Others:



Feel free to edit this page to add yourself to the list, or remove yourself, or to add contact information, or further information about your interest.



Software which might be relevant to facilitating the localization of code written in perl



Please add information about these software packages or to add additional software packages which we have missed.

Multilingual WeBWorK questions

This section collects ideas for future projects:

We now have WeBWorK questions written in several languages. As we gather these questions together into "national libraries" (all contained in one "international library"? :-) ) we will point to where these libraries can be found on the web.

It's been pointed out that in addition to language differences there are cultural differences even in mathematical homework questions between different countries. It would be interesting to have a website where the similarities and differences of say Calculus questions asked of students in different countries could be examined. It's a wide open project if someone is interested.