Skip to content
This repository
Browse code

Add note about how to configure translation menu in the docs

  • Loading branch information...
commit 3aa550889b9b2caeed75d90cffd846ea58d3f001 1 parent 68f2d71
Mjumbe Poe mjumbewu authored

Showing 1 changed file with 34 additions and 5 deletions. Show diff stats Hide diff stats

  1. +34 5 doc/CONFIG.md
39 doc/CONFIG.md
Source Rendered
@@ -4,15 +4,15 @@ Setting up a Shareabouts Web instance
4 4 Step 0: Create a Dataset
5 5 ------------------------
6 6
7   -You'll need an account on a Shareabouts API server.
  7 +You'll need an account on a Shareabouts API server.
8 8
9 9 Log in to the API manager and create a new dataset. Remember the slug
10 10 for your dataset, as you'll use it later. You will also need the API
11 11 key for this dataset, which you can get from the "API Keys" tab of the
12 12 manage UI.
13 13
14   -If you're using the OpenPlans API server, it's
15   -[api.shareabouts.org](http://api.shareabouts.org) and the API manager is
  14 +If you're using the OpenPlans API server, it's
  15 +[api.shareabouts.org](http://api.shareabouts.org) and the API manager is
16 16 [api.shareabouts.org/manage](http://api.shareabouts.org/manage).
17 17
18 18 Step 1: Create a flavor
@@ -44,8 +44,8 @@ Step 3: Edit your flavor
44 44 -----------------------
45 45
46 46 Your flavor directory contains a *config.yml* file that you will be
47   -editing throughout the rest of these instructions. Once you're done with config and local testing,
48   -[deploy](https://github.com/openplans/shareabouts/blob/master/doc/DEPLOY.md).
  47 +editing throughout the rest of these instructions. Once you're done with config and local testing,
  48 +[deploy](https://github.com/openplans/shareabouts/blob/master/doc/DEPLOY.md).
49 49
50 50 ### The Map
51 51
@@ -323,6 +323,35 @@ To apply your translations, run the following from your flavor directory:
323 323 That's it! The compilemessages task is run automatically for the DotCloud and
324 324 Heroku deployments.
325 325
  326 +### Choosing a Language
  327 +
  328 +By default, Shareabouts will try to infer the target user's language from their
  329 +browser settings. If you would like them to be able to explicitly select the
  330 +interface language, you can configure a language selector in the application's
  331 +title bar.
  332 +
  333 +Specify the available languages by adding this section to your configuration:
  334 +
  335 + languages:
  336 + - code: en
  337 + label: I Speak English
  338 +
  339 + - code: es
  340 + label: Hablo Español
  341 +
  342 + - code: hi
  343 + label: मैं हिंदी बोलते हैं
  344 +
  345 +The `code` should be one of the [ISO-639-1 language codes](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes),
  346 +and the `label` should be the string that you want to appear in the language
  347 +selector drop-down menu. Note that the language labels should not be marked for
  348 +translation, and should be written in the target language.
  349 +
  350 +Don't forget to [translate your interface text](#translating-interface-text)
  351 +into each of your desired target languages.
  352 +
  353 +For more information on language codes, see the [Django documentation](https://docs.djangoproject.com/en/1.3/topics/i18n/#term-language-code).
  354 +
326 355 ### Pages and Links
327 356
328 357 Shareabouts allows you to create multiple static pages, linked from

0 comments on commit 3aa5508

Please sign in to comment.
Something went wrong with that request. Please try again.