Translation of Submission on Survey Form

Skip to first unread message

Jason Merman

Jan 31, 2014, 12:34:43 AM1/31/14
I created a new shareabouts sites and configured the site to support Spanish and Chinese.  All is working, except on the survey form (place-detail.html), the previous submission values are not getting translated.

For example, on the add place form, I have a 'Day of Week' field:
- prompt: _(Day of Week)
      type: select
      name: day_of_week
      label: _(Day of Week)
      optional: true
        - label: _(Choose One)
          value: ''
        - label: _(Weekday)
          value: Weekday
        - label: _(Weekend)
          value: Weekend
        - label: _(Monday)
          value: Monday
        - label: _(Tuesday)
          value: Tuesday
        - label: _(Wednesday)
          value: Wednesday
        - label: _(Thursday)
          value: Thursday
        - label: _(Friday)
          value: Friday
        - label: _(Saturday)
          value: Saturday
        - label: _(Sunday)
          value: Sunday
NOTE: I want the data in the database to be in English for reporting, so I do not want to encapsulate the value in _(value)
On the "Add a Place" form, the select option labels are translated correctly.  The problem is that when the place is submitted and the survey form appears, the selected value are not getting translated (Monday is showing as Monday, not Lunes).

I tried to update the place-detail.html by adding {{#_}} ... {{/_}} around the value, but still no translation:
<p class="place-value place-value-{{ name }}">{{#_}}{{ value }}{{/_}}</p>

Is there any why I can get these values translated on the place-detail.html page?

Thank you all for your help,


Frank Hebbert

Jan 31, 2014, 8:18:39 AM1/31/14
Translations are not dynamic, unfortunately -- when you markup your config file and deploy the site, a file of strings to be translated is produced. Then you manually enter the translations for each item (which it sounds like you already did). This is a one-time thing. When django serves up the content, it uses the translated version on request. So, there's no way for the app to translate the content coming from your database. 

(This is not a technically correct description of how translations work, by the way).

A hacky way to get what you want would be to store a translated value alongside the English one, and then show that in place-detail instead of {{ name }}, using some jquery to determine which language to show. This approach requires you to enter translated strings into your survey as hidden fields that get set depending on the active language. 

-- --
Shareabouts Developers group.
You received this message because you are subscribed to the Google Groups "Shareabouts Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Frank Hebbert
OpenPlans | | 720 432-2378 | @fkh
Reply all
Reply to author
0 new messages