Adding ODK Language support for Portuguese

All,

I'm interested to know how difficult it would be to add support for
Portuguese for the ODK interface when Android doesn't yet support this
language (we're talking ODK Collect, not the forms). I've tracked
down the other threads on the implementers discussion group where Yaw
said it would be easy to add a language, especially when using a
standard alphabet. My question is - exactly how difficult?

Thanks,

Ryan

i was just looking into this and i think it's pretty trivial.

you can switch application language (or make it a preference) using
something like http://stackoverflow.com/questions/2264874/android-changing-locale-within-the-app-itself.
this would be a fantastic feature to add to trunk (hint, hint).

··· On Tue, Jul 20, 2010 at 10:11, Ryan Hartford wrote: > All, > > I'm interested to know how difficult it would be to add support for > Portuguese for the ODK interface when Android doesn't yet support this > language (we're talking ODK Collect, not the forms). I've tracked > down the other threads on the implementers discussion group where Yaw > said it would be easy to add a language, especially when using a > standard alphabet. My question is - exactly how difficult? > > Thanks, > > Ryan

Hi Ryan,

It is extremely easy to port ODK Collect to a different language. We
recently implemented a Portuguese translation (Continental/European not
Brazilian) for a project.
I would be happy to send you the translations, but I'm not sure what version
you have (the strings are changing with the new release).

Basically all it comes down to is translating the Strings.xml file located
in the res/values/ and placing it in a new folder (res/values-pt for
example). Make sure that the new values folder ends in a valid country
code. Now when you change locales in the Android OS, ODK Collect will
automagically load the new language strings.

Let me know if you'd like me to send you our translations.

Cheers,
Anton

··· On Tue, Jul 20, 2010 at 1:11 PM, Ryan Hartford wrote:

All,

I'm interested to know how difficult it would be to add support for
Portuguese for the ODK interface when Android doesn't yet support this
language (we're talking ODK Collect, not the forms). I've tracked
down the other threads on the implementers discussion group where Yaw
said it would be easy to add a language, especially when using a
standard alphabet. My question is - exactly how difficult?

Thanks,

Ryan

Actually, I think that Dimagi has already done a Portuguese translation for
ODK, we just need to pull it into the trunk. To translate ODK into any
language all you need to do is get the Collect/res/values/strings.xml file
and change all the english between the tags into the language of your
choice, then put the new strings.xml file into something like
Collect/res/values-PT/strings.xml (where PT is the language code).

It's weird that Android doesn't officially support Portuguese because I know
they've released phones in Brazil that included Portuguese as a locale. You
can also maybe try an app called: morelocale 2

-Carl

··· On Tue, Jul 20, 2010 at 10:20 AM, Yaw Anokwa wrote:

i was just looking into this and i think it's pretty trivial.

you can switch application language (or make it a preference) using
something like
http://stackoverflow.com/questions/2264874/android-changing-locale-within-the-app-itself
.
this would be a fantastic feature to add to trunk (hint, hint).

On Tue, Jul 20, 2010 at 10:11, Ryan Hartford hartfordr@gmail.com wrote:

All,

I'm interested to know how difficult it would be to add support for
Portuguese for the ODK interface when Android doesn't yet support this
language (we're talking ODK Collect, not the forms). I've tracked
down the other threads on the implementers discussion group where Yaw
said it would be easy to add a language, especially when using a
standard alphabet. My question is - exactly how difficult?

Thanks,

Ryan

to clarify, if your phone doesn't have the portuguese locale i think
being able to toggle language in the app itself seems easier than
using locale and toggling the language on the entire app. that's what
i'm proposing villagereach add (in addition to using dimagi's
translations).

··· On Tue, Jul 20, 2010 at 10:26, Carl Hartung wrote: > Actually, I think that Dimagi has already done a Portuguese translation for > ODK, we just need to pull it into the trunk. To translate ODK into any > language all you need to do is get the Collect/res/values/strings.xml file > and change all the english between the tags into the language of your > choice, then put the new strings.xml file into something like > Collect/res/values-PT/strings.xml (where PT is the language code). > It's weird that Android doesn't officially support Portuguese because I know > they've released phones in Brazil that included Portuguese as a locale. You > can also maybe try an app called: morelocale 2 > -Carl > > On Tue, Jul 20, 2010 at 10:20 AM, Yaw Anokwa wrote: >> >> i was just looking into this and i think it's pretty trivial. >> >> you can switch application language (or make it a preference) using >> something like >> http://stackoverflow.com/questions/2264874/android-changing-locale-within-the-app-itself. >> this would be a fantastic feature to add to trunk (hint, hint). >> >> On Tue, Jul 20, 2010 at 10:11, Ryan Hartford wrote: >> > All, >> > >> > I'm interested to know how difficult it would be to add support for >> > Portuguese for the ODK interface when Android doesn't yet support this >> > language (we're talking ODK Collect, not the forms). I've tracked >> > down the other threads on the implementers discussion group where Yaw >> > said it would be easy to add a language, especially when using a >> > standard alphabet. My question is - exactly how difficult? >> > >> > Thanks, >> > >> > Ryan > >

All,

Thanks for the responses on this topic. We're going to look into
launching with what we've got given the brief timeframe we have
available, and the explore utilizing an existing Portuguese version
since it sounds like the work has already been done once. Sounds like
the in-app language toggle is based on the code in the StackOverflow
link, and I'll check out the morelocale2 app to see how that applies.

Anton, thanks for the offer to provide your translations. I might
take you up on that in the near future, though we have translation
resources; the question is more the implementation.

Thanks, as always, for the speedy responses!

Ryan

··· On Jul 20, 10:29 am, Yaw Anokwa wrote: > to clarify, if your phone doesn't have the portuguese locale i think > being able to toggle language in the app itself seems easier than > using locale and toggling the language on the entire app. that's what > i'm proposing villagereach add (in addition to using dimagi's > translations). > > > > On Tue, Jul 20, 2010 at 10:26, Carl Hartung wrote: > > Actually, I think that Dimagi has already done a Portuguese translation for > > ODK, we just need to pull it into the trunk. To translate ODK into any > > language all you need to do is get the Collect/res/values/strings.xml file > > and change all the english between the tags into the language of your > > choice, then put the new strings.xml file into something like > > Collect/res/values-PT/strings.xml (where PT is the language code). > > It's weird that Android doesn't officially support Portuguese because I know > > they've released phones in Brazil that included Portuguese as a locale. You > > can also maybe try an app called: morelocale 2 > > -Carl > > > On Tue, Jul 20, 2010 at 10:20 AM, Yaw Anokwa wrote: > > >> i was just looking into this and i think it's pretty trivial. > > >> you can switch application language (or make it a preference) using > >> something like > >>http://stackoverflow.com/questions/2264874/android-changing-locale-wi.... > >> this would be a fantastic feature to add to trunk (hint, hint). > > >> On Tue, Jul 20, 2010 at 10:11, Ryan Hartford wrote: > >> > All, > > >> > I'm interested to know how difficult it would be to add support for > >> > Portuguese for the ODK interface when Android doesn't yet support this > >> > language (we're talking ODK Collect, not the forms). I've tracked > >> > down the other threads on the implementers discussion group where Yaw > >> > said it would be easy to add a language, especially when using a > >> > standard alphabet. My question is - exactly how difficult? > > >> > Thanks, > > >> > Ryan