Welcome, Guest
Username: Password: Remember me

TOPIC: One question about translation files (.po)

One question about translation files (.po) 1 year 8 months ago #90392

  • vbraque
  • vbraque's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • Karma: 0
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?
Attachments:
Last Edit: 1 year 8 months ago by vbraque.
The administrator has disabled public write access.

Re: One question about translation files (.po) 1 year 8 months ago #90419

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6276
  • Thank you received: 801
  • Karma: 240
Hello,

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 .

Denis
The administrator has disabled public write access.

Re: One question about translation files (.po) 1 year 8 months ago #90428

  • vbraque
  • vbraque's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • Karma: 0
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.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.109 seconds
Donation Image