import rapture.i18n.
import googleTranslate.
implicit val apiKey = GoogleApiKey("YouReallyNeedOneOfTheseToTestThis")
type AppLangs = En with Fr with Es
type IString = I18n[String, AppLangs]
val greeting: IString = en"Hello" //Compile time assistance for es and fr translations are provided
val greeting2: IString = en"Hello" & fr"Bonjour" //no es translation is provided
This could be a common use case, as in an app supporting 3 languages adds a 4th and no longer gets the translation support they did when they first started adding new languages.
import rapture.i18n. import googleTranslate. implicit val apiKey = GoogleApiKey("YouReallyNeedOneOfTheseToTestThis")
type AppLangs = En with Fr with Es type IString = I18n[String, AppLangs]
val greeting: IString = en"Hello" //Compile time assistance for es and fr translations are provided val greeting2: IString = en"Hello" & fr"Bonjour" //no es translation is provided
This could be a common use case, as in an app supporting 3 languages adds a 4th and no longer gets the translation support they did when they first started adding new languages.