CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Spanish Contribute Form
Pages: [1] 2

Author Topic: Spanish Contribute Form  (Read 8531 times)

kirby14

  • Guest
Spanish Contribute Form
August 28, 2009, 01:52:55 pm
I have a quick question that is probably pretty simple but I can't seem to figure it out.

I am trying to create a donation form in Spanish. I have all of the multilingual stuff installed and I have the language file and I can see where I can setup the spanish version for custom fields.... I just can't figure out how to actually view the Spanish form.

Does the user have to register first and choose their language or is it just a parameter you pass in the URL?

Basically, how do I get a Contribution form to display in Spanish?

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Spanish Contribute Form
August 31, 2009, 07:42:39 am
You can either set the default language to Spanish or try appending …&lcMessages=es_ES to the URL and see whether this overrides CiviCRM’s default language.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

kirby14

  • Guest
Re: Spanish Contribute Form
September 02, 2009, 11:37:30 am
Great! The &lcMessages piece was what I was looking for. I am having a few issues with it still, though.

The Credit Card block still has some English in it. Even though all of the other drop downs correctly show "Selecciona" the drop down for the CC info shows "Select."  Could it just be that the CC piece isn't being ran through the t function?

I checked out the billingblock.tpl file and tried to find its corresponding .php file but it is not where the documentation says it should be. The template is in /templates/CRM/core/ but there is no billingblock.php in /CRM/core.

Once all of that is taken care of, I will only have 1 other issue. When I create custom data and go back to view it, I can see where I can add the Spanish translation. The problem is that it never actually displays when I view the Spanish form. All I get is English even if everything around it is Spanish.

A final question. Assuming what I talked about above is fixed, I still have an issue with the actual options. Say I have a drop down and am able to change the label. Is there a way to give an English and Spanish version of the drop down contents as well?

There area seems to be pretty new and the documentation is a little low so I will update the wiki with any information I find.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Spanish Contribute Form
September 03, 2009, 02:03:17 am
Quote from: kirby14 on September 02, 2009, 11:37:30 am
The Credit Card block still has some English in it. Even though all of the other drop downs correctly show "Selecciona" the drop down for the CC info shows "Select."  Could it just be that the CC piece isn't being ran through the t function?

Quite possibly – either that, or the ‘Select’ text has some spelling difference (like a space before or after the word).

Can you please update your forum profile with the CiviCRM version you use so I can track this problem?

Quote
I checked out the billingblock.tpl file and tried to find its corresponding .php file but it is not where the documentation says it should be. The template is in /templates/CRM/core/ but there is no billingblock.php in /CRM/core.

The template is in templates/CRM/Core/BillingBlock.tpl, and if you grep the templates for BillingBlock.tpl you’ll see that it’s sourced in the following files (in CiviCRM 3.0):

Code: [Select]
templates/CRM/Contribute/Form/Contribution/Main.tpl
templates/CRM/Contribute/Form/AdditionalInfo/CreditCard.tpl
templates/CRM/Event/Form/Registration/Register.tpl
templates/CRM/Event/Form/EventFees.tpl
templates/CRM/Member/Form/Membership.tpl
templates/CRM/Member/Form/MembershipRenewal.tpl

Quote
When I create custom data and go back to view it, I can see where I can add the Spanish translation. The problem is that it never actually displays when I view the Spanish form. All I get is English even if everything around it is Spanish.

Which fields that you translate do not show as translated? help_pre/help_post, or some other?

Quote
A final question. Assuming what I talked about above is fixed, I still have an issue with the actual options. Say I have a drop down and am able to change the label. Is there a way to give an English and Spanish version of the drop down contents as well?

If you mean custom data drop-down, then you should be also able to change every option’s name as well.

Quote
There area seems to be pretty new and the documentation is a little low so I will update the wiki with any information I find.

This is most appreciated!
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

kirby14

  • Guest
Re: Spanish Contribute Form
September 03, 2009, 05:58:58 am
Civi Version has been added.

Quote
Which fields that you translate do not show as translated? help_pre/help_post, or some other?

I have actually figured this out now. For some reason, on a lot of fields, I don't get the modal popup to enter all of my language versions... but I just found in the DB where I can directly change them. This is good enough for me for now. 

Just FYI, I can add the Spanish version of:
Custom Data: Group Name
Custom Field: Field Label

but not: (because I don't get the modal popup to enter the Spanish version)
any of the actual custom field options. So the options in a select box or radio choice, etc.


I'll get back to you on some of the other questions as soon as I can. Thanks for the help.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Spanish Contribute Form
September 03, 2009, 06:56:38 am
Hi Kirby,

This is off-topic, but out of curiosity, where abouts are you based / why do you want to use spanish?
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

kirby14

  • Guest
Re: Spanish Contribute Form
September 03, 2009, 07:16:43 am
Smack dab in the middle of the US. We have some donation forms written in Java that were using the old payflow pro api (which is going away) We chose to go with civi to replace the forms so we need to be able to have Spanish versions to replace the old Spanish Java forms.

kirby14

  • Guest
Re: Spanish Contribute Form
September 03, 2009, 12:27:49 pm
Quote
Quite possibly – either that, or the ‘Select’ text has some spelling difference (like a space before or after the word).

Can you please update your forum profile with the CiviCRM version you use so I can track this problem?

I am just confused at where I go to look to find what the actual issue with this is. That is why I was looking for the .php file that corresponds with the .tpl but I assume there isn't one in this case?

Additionallty, I just noticed that the fieldset legend "Credit Card Information" looks like this:

Code: [Select]
<fieldset><legend>{ts}Credit Card Information{/ts}</legend>
and the .po file looks like this:
Code: [Select]
#: templates/CRM/Core/BillingBlock.tpl
#, fuzzy
msgid "Credit Card Information"
msgstr "Información de Trajeta de Crédito o Débito"

and yet while everything else is in Spanish the fieldset legend still says "Credit Card Information"

I've never dealt with .po files before. Is the "#: templates/CRM/Core... stuff just comments so you know where it is at or does it specifically mean that it will use that translation in that block?

Also, would it affect the translation at all if I copied the .tpl file and customized it (in my local custom_templates directory)

I was hoping the file was just missing some of this text because we have a large Spanish Services department that could help out with translations, but it looks like it is all there and just not showing in the form for some reason.
« Last Edit: September 03, 2009, 01:04:17 pm by kirby14 »

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Spanish Contribute Form
September 03, 2009, 01:39:59 pm
alrighty - was hoping we might have a spanish user (i'm based in uk)
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

kirby14

  • Guest
Re: Spanish Contribute Form
September 08, 2009, 10:27:20 am
Does anyone have any ideas or input? These last few areas are all I need to get fixed up to have the Spanish Forms working properly.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Spanish Contribute Form
September 14, 2009, 02:16:12 am
(Apologies for the late reply – we’re having a bit of a hectic time with fixing last 3.0 issues while keeping up with our weekly beta release schedule.)

Quote from: kirby14 on September 03, 2009, 05:58:58 am
For some reason, on a lot of fields, I don't get the modal popup to enter all of my language versions...

We added quite a couple of the modal dialogues in CiviCRM 3.0, as we migrated to jQuery (as they were a bit experimental in 2.2’s Dojo).

Quote
but I just found in the DB where I can directly change them. This is good enough for me for now.

You can always simply change the UI language and then edit the values in the UI – the UI should always show (and let you edit) the current-UI-language values.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Spanish Contribute Form
September 14, 2009, 02:25:19 am
Quote from: kirby14 on September 03, 2009, 12:27:49 pm
I am just confused at where I go to look to find what the actual issue with this is. That is why I was looking for the .php file that corresponds with the .tpl but I assume there isn't one in this case?

This is one of the (few) template files which are generic enough to be included from other template files. You need to check the list of template files that include the billing block (the list is in my reply above) and check these files’ corresponding PHP files. Apologies for not being explicit on this.

Quote
Additionallty, I just noticed that the fieldset legend "Credit Card Information" looks like this:

Code: [Select]
<fieldset><legend>{ts}Credit Card Information{/ts}</legend>
and the .po file looks like this:
Code: [Select]
#: templates/CRM/Core/BillingBlock.tpl
#, fuzzy
msgid "Credit Card Information"
msgstr "Información de Trajeta de Crédito o Débito"

and yet while everything else is in Spanish the fieldset legend still says "Credit Card Information"

Note that this translation is marked as ‘fuzzy’, which means it either was auto generated by gettext from other translations, or the translator wasn’t sure it’s a good one. Fuzzy translations do not get compiled into the final MO file – they need to be unmarked as fuzzy to get there.

Quote
I've never dealt with .po files before. Is the "#: templates/CRM/Core... stuff just comments so you know where it is at or does it specifically mean that it will use that translation in that block?

This comment says which files (should) sport that particular string, yes.

Quote
Also, would it affect the translation at all if I copied the .tpl file and customized it (in my local custom_templates directory)

If you customise a template file and you want any strings in it translated, you need to (a) wrap them in {ts} tags, (b) add these translations to a PO file and (c) compile all of the the PO files into a single civicrm.mo file that you can place in the l10n/xx_YY directory.

Quote
I was hoping the file was just missing some of this text because we have a large Spanish Services department that could help out with translations, but it looks like it is all there and just not showing in the form for some reason.

If you could help with the Spanish translation it would be most appreciated! Please take a look at our web interface at translations.civicrm.org and let me know if there’s anything I can help with. Once again, apologies for the late reply.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

kirby14

  • Guest
Re: Spanish Contribute Form
September 16, 2009, 02:22:22 pm
Awesome. Thanks for the reply :)

I updated the credit card information on the pootle server with the information I received from our Spanish department. I remember reading how often this was updated but can't seem to remember now. When should I expect to see the compiled mo file available?

Also, only 1 other issue and then I am golden. I am still unable to figure out why only 1 of the drop downs says "- select -" instead of "- Selecciona -"  

I did a view source on the English version of the form and verified that "- select -" was exactly the same on all of the drops down. Every single space is exactly the same.

Is there some other reason that it might not be translated?


Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Spanish Contribute Form
September 19, 2009, 03:21:52 pm
Quote from: kirby14 on September 16, 2009, 02:22:22 pm
I updated the credit card information on the pootle server with the information I received from our Spanish department. I remember reading how often this was updated but can't seem to remember now. When should I expect to see the compiled mo file available?

This is usually done on Mondays.

Quote
Also, only 1 other issue and then I am golden. I am still unable to figure out why only 1 of the drop downs says "- select -" instead of "- Selecciona -"  

I did a view source on the English version of the form and verified that "- select -" was exactly the same on all of the drops down. Every single space is exactly the same.

Hm, this is strange indeed. Can you point me to the extact drop-down so I can replicate this (and fix) in my devel sandbox?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

kirby14

  • Guest
Re: Spanish Contribute Form
September 21, 2009, 07:00:20 am
I have included a screen shot. It is the drop down to choose the type of card (visa, mastercard, etc.)


Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Spanish Contribute Form

This forum was archived on 2017-11-26.