简体   繁体   中英

Example for i18n in Play 2.0 (Scala)

我在Play 2.0(Scala)中寻找i18n的例子。

It is the same as how you would have done this is in Play 1.x Scala, which is

@main(title = "The title") {

   <p>Hello world in @Messages("yourmessage")</p>

}

For the full documentation though, check it out here - https://github.com/playframework/Play20/wiki/ScalaI18N

The Scala API is slightly different. You don't need to call ".get". It's working without the import.

<p>Hello world in @Messages("yourmessage")</p>

Also check out this example, which supports two languages: https://github.com/julienrf/chooze

Here is another example using c10n library:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM