propensive / rapture

Rapture
183 stars 39 forks source link

Google Translate only provides suggestions when there is a single language defined. #132

Open ShaneDelmore opened 8 years ago

ShaneDelmore commented 8 years ago

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.

propensive commented 8 years ago

This definitely used to work. I'll try to work out what's changed...