BusProject / SalsaPress

SalsaPress connects WordPress to Salsa. Developed by the Bus Federation and Bus Project.
http://wordpress.org/extend/plugins/salsa-press/
8 stars 2 forks source link

Embedded forms in Spanish? Internationalization #45

Open mojowen opened 9 years ago

mojowen commented 9 years ago

From https://wordpress.org/support/topic/embedded-forms-in-spanish-internationalization?replies=1

We are using Polylang plugin to manage English and Spanish versions of our sites. We have separate forms set up in Salsa for collecting information from English and for Spanish, but the embedded forms selected through the WYSIWYG Salsa embed feature render in English only. I'm not seeing a way to edit the field titles on our Salsa dashboard either.

I've read through the Salsa internationalization FAQ and know that you can set the language via "/l/(first three letters of language)/" in the URL of the page itself (https://help.salsalabs.com/entries/23138628-Internationalization#h) but I dontt know how to set this through this WYSIWYG embed feature.

Please advise.

mojowen commented 9 years ago

Alright to answer the question I reposted: SalsaPress handles internationalization independent of Salsa (which supports it now? cool!)

You'll need to generate a .po file for Spanish. Here's what it looks like for German: https://github.com/BusProject/SalsaPress/blob/master/lang/salsapress-de_DE.po

So you'd create a new file called salsapress-es_MX.po (if you wanted to create one for spanish for folks in Mexco - see here for the full list) then run php run_translations.php and it'll create the .mo file that SalsaPress will use to translate.

ioTus commented 9 years ago

Alright, I acquired the Spanish .po file from https://localize.drupal.org/translate/downloads?project=salsa_entity, downloaded it to the /wp-content/plugins/salsa-press/lang/ directory, renamed it to salsapress-es_MX.po and ran run_translations.php through my web browser. It seems to have successfully generated the .mo file. I have emailed these to you as per the instructions on the SalsaPress "Connect to Salsa" admin panel's "Translations" section at the bottom.

I tried uploading the new .po and .mo files to the client's server but am not seeing the translations on the Spanish side of the site. Is there anything more I need to do to enable Spanish translations?

Thanks!

mojowen commented 9 years ago

You should be able to define the WP_LANG constant this way: https://developer.wordpress.org/themes/functionality/internationalization/#loading-text-domain