Localization

From WeBWorK_wiki
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

  ****this can only be done by an administrator who has access to the webwork software.
  ****Go to the file webwork/lib/WeBWorK/Constants.pm
  **** These changes should be made in default.config (if they are  permanent) or in localOverrides.conf if they are being made just for one local site.  The variable to be changed is $ConfigValues.  Edit it carefully using perl syntax. 
  ****Edit  (carefully) the lines near lines 1238 beginning with  {var => 'language', 
   ## Add new language symbol 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)]
   ## Add description for the new language
     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 ',
  **** Restart apache server so that changes can take effect.

  • 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:

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
  • 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
  • Peter Csiba, Mathematics, J. Selye University, Bratislavska Cesta, Slovak Republic (Hungarian language community)
  • Tamas Meri, IT, JSU, Slovak Republic
  • Peter Szabo, IT, JSU, Slovak Republic
  • Zsuzsanna Gönye, University of West Hungary, Szombathely, Hungary
  • Bernhard Brunner, Switzerland
  • Florian Heiderich, University of Siegen
  • Nathan Wallach, Technion, Israel
  • Robert Mařík, Mendel university, Czech Republic, cs_CZ.po file and some pg files are at github.
  • Fabian Gabel, Hamburg University of Technology, Germany

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.