aapt can generate a pseudo-translation for you to help catch strings that
are not correctly in resources:
-c specify which configurations to include. The default is all
configurations. The value of the parameter should be a comma
separated list of configuration values. Locales should be specified
as either a language or language-region pair. Some examples:
en
port,en
port,land,en_US
If you put the special locale, zz_ZZ on the list, it will perform
pseudolocalization on the default locale, modifying all of the
strings so you can look for strings that missed the
internationalization process. For example:
port,land,zz_ZZ
You can also use this option to have it fail at build time for attributes
that it knows should be translated if they are not provided as a resource
reference:
-z require localization of resource attributes marked with
localization="suggested"
On Sun, May 6, 2012 at 4:43 AM, Jxn <[email protected]> wrote:
>
> Fun discussion.
>
> On 5 Maj, 21:17, Jim Graham <[email protected]> wrote:
> > On Sat, May 05, 2012 at 09:31:00PM +0400, Kostya Vasilyev wrote:
> > > And if you ever decide to have a Russian translation, just send me your
> > > XMLs and I'll do them for you.
> >
> > Thanks. I might just do that, if I go back to the idea of doing
> > translations. Of course, I'd need a lot more people offering to do
> > other languages first. Right now, I'm still in the process of building
> > this monster, learning a lot of stuff I didn't know how to do before in
> > the process (and it's continuing to look and function better and better,
> > with more features added every week[1]).
>
> You really should prepare your program to be translated now, as it
> is.a huge work to do it later. To know how it will work, you could
> translate your program to some kind of street English so you can see
> that you don't forget some string. There are a test locale based on
> English spoken in Denmark, en-DK which isn't a real one. You can use
> that ;-)
>
> > > Also of note: for some locales a two-letter language code is not
> enough.
> > > Consider "pt" vs "pt-rBR", also "zh-rCN", "zh-HK", "zh-rTW" just to
> list
> > > what comes to mind.
>
> Languages could be different between countries, just look at English-
> speaking languages. And many countries have many spoken languages.
> Like Switzerland (3) or China (lots of dialects and languages). And to
> make it more complicated, there are more than one scripture to write
> in too. Just look at all that are supported by Unicode (utf-8 is a
> compressed form of Unicode, so just stick to that).
> So to extract all strings that appears in the UI in external files is
> a good thing, even if you "only" knows English.
> And I haven't even started to talk about how to print floating point
> or currency or or dates or physical things like length or volume. You
> should really start using metrics and ISO dates, all of you! :-)
>
> So, even though you don't know the languages, don't make it harder
> than it need to localize your program later. And yes, you should have
> it done by humans.
>
> > I didn't know that.... I hope the guy who brought that up in one of the
> > Stack Overflow posts that Raghav pointed me to knows that....
>
> He might, or not. We who must learn more than one language usually
> have it easier to understand the problems with translation. Especially
> if you know non-germanic ones.
> It is not actually hard, but there are so much details that you have
> to think of that your program needs to adjust to. A simple one is what
> do the country use for decimal separator? Comma ',' or point '.'?
>
> > Thanks,
> > --jim
> >
> > [1] I have some physical/mental limits (limited energy resources...all
> > from cancer #1 blah blah) which, if I work on it too much in any
> > given day (or set of days), can leave me unable to even SEE the
> > code, much less work on it, for several days to a week, with
> > migraines to go along with it. I have to be very careful.....
> > On those off days, I tend to read the dev guide for more info
> > on upcoming stuff, new ideas, etc.
>
> That is good thing to do.
>
> Happy localization to you. :-)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
Dianne Hackborn
Android framework engineer
[email protected]
Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails. All such
questions should be posted on public forums, where I and others can see and
answer them.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en