WeBWorK Main Forum

WeBWork language files?

WeBWork language files?

by Éva Rácz -
Number of replies: 4
I have recently been introduced to ww, and find it a very useful tool, however, I did not find any convenient way to change the user interface language (what I did up to now was to translate text parts of the .pm files in webwork/webwork2/lib/WeBWork/Contentgenerator to Hungarian). Is there a simpler way to localize WeBWork? Thank you.
In reply to Éva Rácz

Re: WeBWork language files?

by Michael Gage -
Dear Eva,

Unfortunately there is not currently a simpler way to localize WeBWorK. I would very much like to see a localization project started since WeBWorK is now used in several other countries. I know of installations in Mexico, France, Sweden, Israel and Korea which have translated part of the interface. Reviewing the code in the ContentGenerator files and indexing the strings to language files would be an excellent project which would make localization much easier for future adoptees.

-- Mike
In reply to Michael Gage

Re: WeBWork language files?

by Éva Rácz -
Dear Mike,

Thank you for the quick answer, I'll stick to modifying the pm files. (Although actually, I think that even in a one-language set-up, it could be useful to have a convenient way to change the texts, or as in my case, the translations.)

Best,
Eva
In reply to Éva Rácz

Re: WeBWork language files?

by Michael Gage -
Hi Eva,

I agree that exporting strings to language files would be useful even in one language situations. Here is a quick summary of what I know about localization frameworks in perl. (Others with more knowledge might like to jump in here.) You might find them useful in your project. If you do, please keep us apprised on what you are doing --- we might be able to use it as a base for full scale localization and I don't want to duplicate any more effort than is absolutely necessary.

History: Web Localization in Perl
CPAN source: http://search.cpan.org/dist/Locale-Maketext/
Review: http://cpanratings.perl.org/dist/Locale-Maketext-Lexicon

Take care,
Mike

In reply to Éva Rácz

Re: WeBWork language files?

by Davide Cervone -
I actually had localization in the back of my mind when I did the error message facility for the MathObject library. There is a mechanism for replacing messages by other messages that I originally intended as a means of translating them into other languages. I never went so far as to actually put together a working example of error messages in other languages, but the framework is there.

Of course, that is only for error messages. It would do nothing about the text of the problems, the names of buttons, or the navigational links that are part of WeBWorK. All that would need additional work.

Davide