rapture
rapture copied to clipboard
Google Translate only provides suggestions when there is a single language defined.
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.
This definitely used to work. I'll try to work out what's changed...