Difference between revisions of "Localization"
Fabiangabel (talk | contribs) (→People who have at one time or another expressed interest however mild :-) , in the localization project: Add Fabian Gabel) |
|||
(37 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
− | {{UnderConstruction}} |
||
Line 13: | Line 12: | ||
one language into problems in a second language. |
one language into problems in a second language. |
||
=== Details and progress for Localization project === |
=== 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 |
||
+ | * https://www.transifex.com/projects/p/webwork/]] -- webwork collection of translated strings |
||
* Language |
* Language |
||
** Ben Walter started this project using MakeText. (5/17/2011) |
** Ben Walter started this project using MakeText. (5/17/2011) |
||
*** <s> At the moment the language is set when the apache child starts up -- it needs to be abstracted and made configurable from Course Configuration. </s> |
*** <s> At the moment the language is set when the apache child starts up -- it needs to be abstracted and made configurable from Course Configuration. </s> |
||
*** The language can now be selected for a given course by the instructor from the choices on the Course Configuration page. |
*** 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. |
||
+ | **** Add the language .mo and .po file to the directory .../webwork2/lib/WeBWorK/Localize |
||
+ | **** Restart the server. -- that's it!!!!! |
||
+ | <strike> |
||
+ | ****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 <code>$ConfigValues</code>. Edit it carefully using perl syntax. |
||
+ | ****Edit (carefully) the lines near lines 1238 beginning with <code> {var => 'language', </code> |
||
+ | ## 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. |
||
+ | </strike> |
||
+ | **** <strike> At some later date we'll figure out an easier method to add a new language</strike> Done!!!! in [[Release notes for WeBWorK 2.7]] |
||
+ | |||
* Date and time |
* 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. |
** We need to be able to localize the date and time format consistently and allow it to be set in Course Configuration. |
||
− | *** It seems the Locale module should be helpful? (still an open project 10/13/2011) |
||
+ | *** 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. |
||
− | * Grant He, a student at the U. of Rochester, has been working on this project over the summer. (10/13/2011) |
||
+ | *** 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. |
** 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 |
** 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. |
+ | ** <s>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.</s> |
− | + | ||
− | + | * (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 |
* 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: |
|
− | + | ** [https://github.com/openwebwork/webwork2/tree/develop/lib/WeBWorK/Localize GitHub devel branch] |
|
+ | ** [https://github.com/openwebwork/webwork2/tree/master/lib/WeBWorK/Localize GitHub master branch (older files)] |
||
+ | ** <strike>[http://webwork.maa.org/viewvc/system/trunk/webwork2/lib/WeBWorK/Localize/ Old MAA repository]</strike> |
||
=== People who have at one time or another expressed interest however mild :-) , in the localization project === |
=== People who have at one time or another expressed interest however mild :-) , in the localization project === |
||
Line 39: | Line 67: | ||
* David De la Rosa, Centro de Investigacion en Matematicas, Guanajuato, Gto, México |
* David De la Rosa, Centro de Investigacion en Matematicas, Guanajuato, Gto, México |
||
* Martin Tamm, University of Stockholm, Stockholm, Sweden |
* Martin Tamm, University of Stockholm, Stockholm, Sweden |
||
− | * Marc |
+ | * Marc Buffat, Mechanical Engineering, Universite Claude Bernard Lyon 1, Lyon, France |
− | + | ||
* Eva Racz, Dept. of Physics, Budapest University of Technology and Economics, Budapest, Hungary |
* Eva Racz, Dept. of Physics, Budapest University of Technology and Economics, Budapest, Hungary |
||
* Arie Poran, Ono Academi College, Israel |
* Arie Poran, Ono Academi College, Israel |
||
* Dr. Mika Seppala, University of Helsinki, Finland |
* Dr. Mika Seppala, University of Helsinki, Finland |
||
* Benjamin Walter, Middle East Technical University, Turkey |
* 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 |
||
+ | * [http://www.heiderich.org/math/ Florian Heiderich], University of Siegen |
||
+ | * Nathan Wallach, Technion, Israel |
||
+ | * [http://user.mendelu.cz/marik Robert Mařík], Mendel university, Czech Republic, cs_CZ.po file and some pg files are at [https://github.com/robert-marik/hw-webwork github]. |
||
+ | * [https://www.mat.tuhh.de/home/fgabel_en Fabian Gabel], Hamburg University of Technology, Germany |
||
Others: |
Others: |
||
Line 87: | Line 128: | ||
− | |||
+ | [[Category:Translators]] |
||
[[Category:Developers]] |
[[Category:Developers]] |
||
+ | [[Category:Localization]] |
Latest revision as of 02:29, 10 March 2021
Contents
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
- https://www.transifex.com/projects/p/webwork/]] -- webwork collection of translated strings
- 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.
- Add the language .mo and .po file to the directory .../webwork2/lib/WeBWorK/Localize
- Restart the server. -- that's it!!!!!
- Ben Walter started this project using MakeText. (5/17/2011)
****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.
At some later date we'll figure out an easier method to add a new languageDone!!!! in Release notes for WeBWorK 2.7
- 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?
- We need to be able to localize the date and time format consistently and allow it to be set in Course Configuration.
- (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
- Cautionary tale about localizing software:
- CPAN -- MakeText
- An example: Catalyst Advent Calendar
- Bugzilla is an example of a throughly localized perl web application
- A plan for localizing an application.
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.