Check out the LimeSurvey source code on GitHub!

One question about translation files (.po)

4 years 1 month ago - 4 years 1 month ago #90392 by vbraque
Hi world!
This is a custom translation question.
I'm working in v1.92 but I'm afraid this problem is the same for v2.0.
I'm designing multilanguage surveys (spanish-catalan). In fact, in my region we speak a variant of catalan called valencian, very similar, but not the same. As international entities only recognize catalan-Catalonia and not catalan-Valencian, we must work with original limesurvey .po file from the original catalan translation, and then edit some strings as describe in official translation website. No problem about that, we've been working this way long time ago with no problem.
The problem we have detected is about LANGUAGECHANGER replacement field. A few months ago, the values shown in this list are taken from the "fist" value of the "language" instead of the "second", I mean:
- Let's assume we're working in two languages: spanish and catalan
- We've modified the original es.po and ca.po and change some strings: string "Spanish" ("Castellano" instead of the original "Español"), and string "Catalan" ("Valencià" instead of the original "Català").
- After that, we've compiled files and upload to server.
- As spected, we can se changes in welcome page and languages selection in config settings page (see file attatched).
Everything is okay.

Then, we include {LANGUAGECHANGER} for example in a new survey welcome page. When we test the survey a list with 2 languages appears, but... the values shown are "Español" and "Català" instead of the spected modified values "Catellano" and "Valencià". This is the real problem because "Español" and "Català" string doesn't exist in the es.po and ca.po uploaded files. So, how can it show these values? where does it take it from?
Where are "Español" and "Catalán" strings stored (we can't find them in .po files)?

Any suggestion, any other file to revise?
Last Edit: 4 years 1 month ago by vbraque.

Please Log in to join the conversation.

4 years 1 month ago #90419 by DenisChenu

You can have a look at: $supportedLanguages and $supportedLanguages in classes/core/surveytranslator.php .

For the first problem,i don't know, not sure but maybe you can send a message to This email address is being protected from spambots. You need JavaScript enabled to view it. to know if you can have a specific code for ca-valencia .


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

4 years 1 month ago #90428 by vbraque
Thanks a lot, Dennis, for your quick response.

Certainly, your suggestion works, so I'm going to apply it right now.
But I'm sure I've NEVER modified before core files as "surveytranslator.php", in previous versions. I just modified .po files and {LANGUAGECHANGER} always reflects those changes in the drowdown list.
In fact, as I've told you in the inicial thead, several pages of LS show the strings contained in .po files. Well, they show both strings contained in ".po" and "surveytranslator.php".
I mean, is less intrusive modify a ".po" file than "surveytranslator.php" file. Language is hardcoded in this second one.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form