playframework-ja / translation-project

Play Framework Documentation Japanese Translation
61 stars 132 forks source link

manual/scalaGuide/main/i18n/ScalaI18N.md #1013

Closed garbagetown closed 9 years ago

garbagetown commented 10 years ago
--- /Users/garbagetown/Desktop/2.2.0/manual/scalaGuide/main/i18n/ScalaI18N.md   2013-07-29 23:52:24.000000000 +0900
+++ //Users/garbagetown/Desktop/2.3.5/manual/scalaGuide/main/i18n/ScalaI18N.md  2014-07-28 12:26:38.000000000 +0900
@@ -1,3 +1,4 @@
+<!--- Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> -->
 # Messages and internationalization

 ## Specifying languages supported by your application
@@ -32,7 +33,7 @@

 ## Messages format

-Messages can be formatted using the `java.text.MessageFormat` library. For example, assuming you have message defined like:
+Messages are formatted using the `java.text.MessageFormat` library. For example, assuming you have message defined like:

 '''
 files.summary=The disk {1} contains {0} file(s).
@@ -44,6 +45,20 @@
 Messages("files.summary", d.files.length, d.name)
 '''

+## Notes on apostrophes
+
+Since Messages uses `java.text.MessageFormat`, please be aware that single quotes are used as a meta-character for escaping parameter substitutions.
+
+For example, if you have the following messages defined:
+
+@[apostrophe-messages](code/scalaguide/i18n/messages)
+@[parameter-escaping](code/scalaguide/i18n/messages)
+
+you should expect the following results:
+
+@[apostrophe-messages](code/ScalaI18N.scala)
+@[parameter-escaping](code/ScalaI18N.scala)
+
 ## Retrieving supported language from an HTTP request

 You can retrieve the languages supported by a specific HTTP request:
garbagetown commented 9 years ago

:hand:

garbagetown commented 9 years ago

merged at #1117