Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is hard to know from your description exactly what the problem may be, so I have outlined how you should do a multi-lingual app.</p> <p>There are a number of steps you must follow to get internationalisation to work. Firstly, you must change your <code>application.conf</code> file to declare your supported languages.</p> <p>So, if you are supporting English and French, you would do</p> <pre><code>application.langs=en,fr </code></pre> <p>You must then create the language file for your French translation called <code>messages.fr</code>. The English language would just stay in the standard <code>messages</code> file. In this new file, add your name value pairs for the key and message.</p> <p>The way Play processes the messages, is to look first in the locale specific message file first (so for english it would be <code>messages.en</code>, which does not exist, and for french it would be <code>messages.fr</code>). If the message cannot be found in the locale specific message file, it will look at the global message file. So your global <code>messages</code> file acts as the catch all.</p> <p>Then, in your code, set the language for your particular user, using </p> <pre><code>Lang.change("fr"); // change language to French </code></pre> <p>Remember, that this will save a cookie for the particular user in a PLAY_LANG cookie, so check that this cookie is being created for the user.</p> <p>Final note, make sure that your files are UTF8 encoded. It causes problems if it is not.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload