Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
Lance Gatlin committed May 1, 2016
1 parent 096e302 commit dd75569
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ of the type-class I18N[A] for the type.
that loads bundles of resources containing message key to message format files
(named by their locale) from all jars located on the classpath.

== Examples
== Example

----
Expand All @@ -61,12 +61,12 @@ implicit val i18ncfg = I18NConfig(Locale.US)
val m_test = 'm_test.m[Int,I18NString]
// Using i18ncfg, resolve the message key to a message format and interpolate the arguments
// Note: the Int argument automatically invokes I18N[Int] to correctly format the integer for
// the current locale
// Note: the Int argument is automatically converted to I18NString by invoking the
// I18N[Int] type-class
val test_i18n_str = m_test(1,"test".asI18N)
// Note: the Double argument automatically invokes I18N[Double] to correctly for the double for
// for the current locale
// Note: the Double argument is automatically converted to I18NString by invoking the
// I18N[Double] type-class
i18n"interpolate some arguments $test_i18n_str ${25.0}"
----
9 changes: 4 additions & 5 deletions src/test/scala/s_mach/i18n/example/ExampleUsage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ implicit val i18ncfg = I18NConfig(Locale.US)
val m_test = 'm_test.m[Int,I18NString]

// Using i18ncfg, resolve the message key to a message format and interpolate the arguments
// Note: the Int argument automatically invokes I18N[Int] to correctly format the integer for
// the current locale
// Note: the Int argument is automatically converted to I18NString by invoking the
// I18N[Int] type-class
val test_i18n_str = m_test(1,"test".asI18N)

// Note: the Double argument automatically invokes I18N[Double] to correctly for the double for
// for the current locale
// Note: the Double argument is automatically converted to I18NString by invoking the
// I18N[Double] type-class
i18n"interpolate some arguments $test_i18n_str ${25.0}"

}

0 comments on commit dd75569

Please sign in to comment.