## WeBWorK Main Forum

### Localization Translator.pm

by Michele Nasoni -
Number of replies: 7

﻿Hi

Probably it is a silly question I am a newbie, I installed the WeBWork only yesterday.

I was wondering how I can translate this

/opt/webwork/pg/lib/WeBWorK/PG/Translator.pm:         $problem_result{msg} = 'In order to get credit for this problem all answers must be correct.' ; I have tried like this #: /opt/webwork/pg/lib/WeBWorK/PG/Translator.pm:1505 msgid "In order to get credit for this problem all answers must be correct." msgstr "Afin d'obtenir 100 % pour ce problème, toutes les réponses doivent être correctes." But it does not work. In reply to Michele Nasoni ### Re: Localization Translator.pm by Michael Gage - Hi Michele, You've found a bug (or at least a missing feature) in our language translation. It looks like the strings in the Translator.pm file have not been tagged. Line 1505 should be$problem_result{msg} = maketext('In order to get credit for this problem all answers must be correct.') ;

And the phrase needs to be entered into the fr.po file (and others) in order to be translated. maketext can be imported from PGcore where it is defined at line 749

If you have time and are interested in helping out with translation issues please send me an email gage@math.rochester.edu.

Others knowledgeable in this area are
Julie Tremblay, collège de Bois-de-Boulogne,
if you are not already in touch with her.
also:
• WeBWorK hosting site in french (Canada) http://math.ccdmd.qc.ca/ maintained by the Centre collégial de développement de matériel didactique

### Re: Localization Translator.pm

by Michele Nasoni -

I did this in order to be sure to modify the right thing

In /opt/webwork/pg/lib/WeBWorK/PG/Translator.pm

if ($ansCount > 1 ) {$problem_result{msg} = maketext('I2n order to get credit for this problem all answers must be correct.') ;
}

I modified the fr.po, I restarted the apache, refreshed the page but I still have In order to get credit for this problem all answers must be correct.

I checked on the DB and I did not find anything too.

### Re: Localization Translator.pm

by Michael Gage -

that looks about right.  Did you restart the apache server after you made the change?

### Re: Localization Translator.pm

by Michele Nasoni -
Yes I did, also today I restarted apache, the question was already created and I login as an admin

### Re: Localization Translator.pm

by Danny Glin -

The text you pasted into your message has a typo.  There is a 2 in the middle of the first word.  If this typo is also in your copy of Translator.pm then the text won't match the string in the translation file and it won't take effect.

### Re: Localization Translator.pm

by Michele Nasoni -

I did in order to be sure that I was editing the right file, but the I2n.... does not show on the web page, I do not understand

And that message is coming form here

﻿ WeBWorK/ContentGenerator/Problem.pm

output_message

And this is the question

https://github.com/CCDMD/webwork-banque-problemes-libres/blob/master/BPL/CCDMD/Calcul_avance-01fonctions_plusieurs_variables/continuite_2_SL.pg