Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7754339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:16:53+00:00 2026-06-01T12:16:53+00:00

In my Play! 2.0 application I would like to define the following languages: #

  • 0

In my Play! 2.0 application I would like to define the following languages:

# The application languages
# ~~~~~
application.langs=en-GB,de-DE,nl-NL

I also have created 3 files that ends with the corresponding language codes:

Messages.en-GB
Messages.de-DE
Messages.nl-NL

When I start the application without any request for a translated key I get the following error message:

conf/application.conf: 12: Key 'de-DE' may not be followed by token: ',' (if you intended ',' to be part of the value for 'de-DE', try enclosing the value in double quotes)

Also when trying to access a message from the Scala template I still see the same message. I request the message by the following code:

@Messages("login.page")

The above changes I have done according to the Play manual: http://www.playframework.org/documentation/2.0/JavaI18N . So I have two questions:

  1. How can I set the default langauge and change it like in 1.2.4 (Lang.change(“en-GB”))
  2. How to access the messages from the Scala templates?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:16:55+00:00Added an answer on June 1, 2026 at 12:16 pm

    Changing the language is not possible in Play! 2.0, see this discussion: http://groups.google.com/group/play-framework/browse_thread/thread/744d523c169333ac/5bfe28732a6efd89?show_docid=5bfe28732a6efd89

    and this ticket: https://play.lighthouseapp.com/projects/82401-play-20/tickets/174-20-i18n-add-ability-to-define-implicit-lang-for-java-api#ticket-174-4

    Although, when you register multiple languages you should enclose them in double qoutes, like this:

    application.langs="en-GB,de-DE,nl-NL"
    

    And then you can access them from the scala templates like this:

    @Messages.get("login.title")
    

    So currently the default language is the language that is defined in the file messages (without any prefix!!)

    Or you can just use @Messages(“not.logged.in”)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a flash video called abc.swf that i would like to play when
Hello I would like to use the sass module in a play application. We
I have created a play application and have some models. One of them contains
I have just written a game for the Google Play Store and would like
I'm learning myself Play 2.0 (Java API used) and would like to have a
I would like to Access Play! Framework application over the LAN using different IP's
I would like to create an application that runs on XBox 360 (downloaded using
Here is the problem: I have a Silverlight application where we would like to
I have a Play! web application. If the user is logged in, I would
I would like to write a console application that automatically posts information to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.