On Tue, May 17, 2011 at 3:30 AM, Adriano Monteiro Marques
<[email protected]> wrote:
> HI Zubair!
> Congrats for another awesome post!
>
> Cheers!
>
> Begin forwarded message:
>
> From: Zubair Nabi <[email protected]>
> Date: May 16, 2011 2:55:27 PM GMT-03:00
> To: [email protected]
> Subject: [The UMIT project] i10n and L8n in Android
>
> One of the strongest features of open source software is its global
> reachability. But sometimes language and local convention might be a
> hindrance. That's where Internationalization (i10n) and Localization (L8n)
> come in. The combination of both known as Globalization is a process which
> allows software to be molded according to local languages and convention
> without making any changes to the codebase, for example, changing the
> language from English to French or changing the currency symbol from the
> dollar to the pound.
> Android by default allows the programmer to decouple the code and the
> non-code assets such as text, images and formatting. These "resources" are
> present under the res/ directory [1]. The default text for example is
> present inside res/values/strings.xml. For instance, if your default
> language is English and you want to allow your application's text to
> localize to French when the device's language is changed to French, the
> application would need to have an alternative locale-specific resource
> directory, res/values-fr/strings.xml in this case [2].
> Let's now consider an example. We have an application interface which
> contains a button which should have the label "Send" in English and
> "Envoyer" in French. We first add the following line to
> res/values/strings.xml:
> Send
> And then add Envoyer to res/values-fr/strings.xml. Inside the layout XML for
> this button's interface, within the button's definition tag (), we add
> android:text="@string/string_send". Essentially, what we have done is that
> by way of indirection of we have pointed the Android runtime to access our
> string resource using @string. To access the same string programmatically in
> Java we would use getString(R.string.string_send). Our button has now been
> localized to French. The same strategy can also be used to localize
> graphics, i.e. by providing graphics in both res/drawable/ and
> res/drawable-fr/. The two-letter ISO 639-1 code for other languages can be
> found at [3].
> 1. http://developer.android.com/reference/android/content/res/Resources.html
> 2. http://developer.android.com/guide/topics/resources/localization.html
> 3. http://www.loc.gov/standards/iso639-2/php/code_list.php
>
> --
> Posted By Zubair Nabi to The UMIT project at 5/16/2011 02:09:00 PM

I think we should start blogging it or something. That's awesome to
have our GSoC developers writing good stuff other than python code :D

>
> ---
> Adriano Monteiro Marques
> http://www.thoughtspad.com
> http://www.umitproject.org
> http://blog.umitproject.org
> http://www.pythonbenelux.org
> "Don't stay in bed, unless you can make money in bed." - George Burns
>



-- 
    Rodolfo Carvalho
     Web Developer
[email protected]

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Umit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/umit-devel

Reply via email to