SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
݇†ó£Œ´ ÜŠO
«èê¡èœ ðô ®¬õv
èœ ñŸÁ‹ ðô ªñ£N
èO™ ðò¡ð´A¡øù. à¼
õ£‚èŠð´‹ ÜŠO«èê¡èœ
ªê™«ðC ðò¡ð´ˆ¶‹
ªñ£N‚° ãŸð îèõ™èœ,
â‡èœ, Ý®«ò£ ç¬ð™èœ,
ðí °Pf´èœ ñŸÁ‹
ð ì ƒ
è¬÷ ñ£ŸP ܬñ‚è
(Locales) ðò¡ð´Aø¶.
꣡ø£è â¡Â¬ìò
ªê™«ðCJ¡ îèõ™ ªîK
»‹ ªñ£NJ¬ù ¬õˆ
¶œ«÷¡. Üîù£™
ðì‹ -1™ îèõ™ ݃Aôˆ
F½‹ ñŸÁ‹ HK†®w
ªè£® F¬óJ™ «î£¡P
»œ÷¶.
Ü´ˆîî£è ðì‹-2 setting->Language Key
board-™ ªñ£NJ¬ù ñ£ŸP ܬñ‚è º®
»‹. (ðì‹-3) Þƒ° ªñ£NJ¬ù Germen
݇†ó£Œ®™ ðô
ªñ£Nèœ ðò¡ð´ˆ¶‹ º¬ø!
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com
/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_a"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_b"
/>
<Button
android:id="@+id/flag_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Hello,
L10N</string>
<string name="text_a">Shall I compare
thee to a summer"'"s day?</string>
<string name="text_b">Thou art more
lovely and more temperate.</string>
<string name="dialog_title">No
Localisation</string>
<string name="dialog_text">This dialog
box"'"s strings are not localised. For every
locale, the text here will come from
values/strings.xml.</string>
</resources>
Deutsch (Deutschland)
ñ£ŸP ܬñ‚A«ø¡.
e‡´‹ ÜŠO«èê¬ù
ª ê ò ™ð ´ ˆ¶ ‹«ð £ ¶
ðì‹ 4-™ àœ÷¶
«ð£¡ø ªü˜ñ¡ ªñ£N
ñŸÁ‹ F¬ó «î£¡Á‹.
Þ¬î «ð£¡Á Langu
age& Keyboard â¡ø «î˜
M¬ù English(Unite Sta
tes) â¡Á ñ£ŸP ܬñˆ
 ðì‹ 5-™ àœ÷¶
«ð£¡Á F¬ó «î£¡Á‹.
Language&Keyboard â¡ø
«î˜M¬ùFrancais(France)
â¡Á ñ£ŸPù£™ ðì‹
6-™ àœ÷¶ «ð£¡Á
F¬ó «î£¡Á‹.  à¼
õ£‚°‹ÜŠO«èꡫ
ªî´‚èŠð´‹ ªñ£N‚°
ãŸð ñ£Áî™ ãŸð´ñ£Á
ܬñˆFì º®»‹.
ðì‹-1
ðì‹-2
ðì‹-3
ðì‹-4Gó™-1
Gó™-2
ÜŠO«èê¡ à¼
õ£‚°‹ «ð£¶, ªñ£N
‚° ãŸð îèõ™èœ,
ðìƒèœñŸÁ‹ç¬ð™
è¬÷ «î˜‰ªî´‚è
«õ‡´‹.
ÜŠO«èê¡ ªêò™
ð´‹«ð£¶,«î˜‰ªî´‚
èŠð†´œ÷ªñ£N‚°
ãŸð îèõ™èœ, ðìƒ
èœ ñŸÁ‹ ç¬ð™
è¬÷ 裇H‚è «õ‡
´‹.
Localization ꣘‰î ÜŠO«èê¡ à¼õ£‚°‹
«ð£¶ F†ìI´î™ º‚Aòñ£ù ªêòô£°‹.
݇†ó£Œ´ Í¡Á Mîñ£ù K«ê£˜v
ç¬ð™è¬÷ ðò¡ð´ˆ¶A¡ø¶.
ܬõ, res/drawable, res/layout ñŸÁ‹ res/
value à¼õ£‚èŠ «ð£°‹ ÜŠO«èê¡ Þó‡´
ªì‚v† MÎ ñŸÁ‹
ð†ì¡ ªè£‡®¼‚
°‹ ð†ì¬ù AO‚
ªêŒî¾ì¡ îèõ™
F¬óJ™ «î£¡Á
ñ£Á à¼õ£‚èŠ
«ð£A«ø£‹.
¯ç𣙆 ªñ£N
ò£è British, English
ñŸÁ‹ Default Loca
tion (Þì‹) United
Kingdom â¡Á «î˜‰
ªî´ˆ¶ ªè£œÀƒ
èœ. à¼õ£‚èŠ
Ý¡†ó£Œ´ -2
Þ󣋰ñ£˜ ªô†²Iï£ó£òí¡
11
package com.ram.helloln;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.*;
public class HelloLNActivity extends Activity {
/** Called when the activity is first created.
*/
@Override
public void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button b;
(b =
(Button)findViewById(R.id.flag_button)).setBa
ckgroundDrawable(this.getResources().getDra
wable(R.drawable.flag));
// build dialog box to display when user
clicks the flag
AlertDialog.Builder builder = new
AlertDialog.Builder(this);
builder.setMessage(R.string.dialog_text)
.setCancelable(false)
.setTitle(R.string.dialog_title)
.setPositiveButton("Done", new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
}
});
final AlertDialog alert = builder.create();
// set click listener on the flag to show
the dialog box
b.setOnClickListener(new
View.OnClickListener() {
public void onClick(View v) {
alert.show();
}
});
}
}
ðì‹-5
ðì‹-6
ðì‹-8
Gó™-3
ðì‹-7
ðì‹-9
ðì‹-10
ðì‹-12
«ð£°‹ ÜŠO«èê¡ ªè£´ˆ¶ ªî£ìƒè
«õ‡´‹.
W›è‡ì îèõ™è¬÷ ªè£´ˆ¶ ªî£ìƒè
«õ‡´‹.
Project Name:Hello 10N
Application Name: Hello, LION
Package Name: com.ram.hello10n
Create Activity:HelloLION
Min SDK Version:3
res/layout/main/.xml-L™ ªì‚v†
MÎ ñŸÁ‹ ð†ì¡ à¼õ£‚è Gó™ 1-™
àœ÷ Gó™è¬÷ ðò¡ð´ˆî «õ‡´‹.
Ü´ˆîî£è ÜŠO«èê‚° «î¬õò£ù
String.xml ç¬ðL¬ù à¼õ£‚è «õ‡´‹.
Þƒ° "text-a", "text-b", "dialog-title", "dialog-
text" «ð£¡ø¬õ‚è£ù îèõ™ â¡ù «î£¡ø
«õ‡´‹ â¡ðîŸè£ù îèõ™ ªè£´‚A«ø£‹.
ÞîŸè£ù Gó™ -2™ àœ÷¶.
ªñ£N‚° ãŸð ªè£® ñ£ø «õ‡´‹.
Üîù£™ Default Ýè drawable-hdpi â¡ø
ç«ð£™ìK™ developer.android.com/ images/
hello-l10n/flag.png Ü™ô¶ «õÁ Þ¬íò
î÷ˆFL¼‰«î HK†®w ªè£®J¬ù flag.
png â¡ø ªðòK™ «î˜‰ªî´ƒèœ.
main.xml ïñ¶ «ôܾ† ç¬ðô£°‹ ÞîŸ
è£ù Ý‚®M†® ç¬ðL¬ù à¼õ£‚è «õ‡
´‹. HelloLNActivity -‚è£ù Gó™ -3 ™
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Hallo,
Lokalisierung</string>
<string name="text_a">Soll ich dich einem
Sommertag vergleichen,</string>
<string name="text_b">Der du viel
lieblicher und sanfter bist?</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Bonjour,
Localisation</string>
<string name="text_a">Irai-je te
comparer au jour d'été?</string>
<string name="text_b">Tu es plus tendre
et bien plus tempéré.</string>
</resources>
- ªî£ì¼‹
ðì‹-11
ðì‹-14
ðì‹-13
Gó™-5Gó™-4
ªè£´‚èŠð†´œ÷¶. ªè£´‚èŠð†´œ÷
Gó™ ð†ìQŸ° H¡ùEJ¬ù ܬñˆF´‹.
ð†ì¬ù AO‚ ªêŒî¾ì¡ Alert Dialog
J¬ù  ªñ£N‚° ãŸð ñ£ŸP ܬñ‚èŠ
«ð£õF™¬ô. Üîù£™ dialog-text Ýù¶
res/values/string/.xml â¡ø ç¬ðL™ àœ÷
îèõ¬ô 裇H‚°‹. ðì‹-7 ™ àœ÷¶
«ð£¡Á ªñ£N‚° ãŸð «î˜‰ªî´‚°‹
º¬øJ¬ù ܬñˆFì «õ‡´‹. ÜîŸè£ù
õNº¬øè¬÷ 𣘊«ð£‹. ðì‹ 8-™
ªñ£N‚° ãŸð îèõ™èœ ⃰ «êI‚èŠðì
«õ‡´‹ â¡ðî¬ù °P‚Aø¶. ꣡ø£è
ªü˜ñ¡ ªñ£N‚° ãŸð õ®õ¬ñ‚è Local
-code de-rDt â¡ðî¬ù ðò¡ð´ˆî «õ‡´‹.
ªü˜ñQ‚° string.xml ç¬ðL¬ù res/
value-de â¡ø ç«ð£™ìK™ «êIˆFì «õ‡
´‹. ºîL™ File>New>AndroidXML File â¡ð
 «î˜‰ªî´‚è «õ‡´‹. (ðì‹-9)
Ü´ˆ¶ Hó£ªü‚† â¡ð HelloL10N
â¡ð¶ «î˜‰ªî´‚èŠð†®¼‚°‹. File â¡ð
 String.xml â¡Á ªè£´‚è
«õ‡´‹. H¡ ù˜
Language â¡ðî¬ù
«î˜‰ªî´‚è «õ‡´‹.
(ðì‹-10)
H¡ù˜ Language â¡ø
«î˜MŸ° de â¡Á ªè£´
‚è «õ‡´‹. (ðì‹ 11)
Þ‰î ªêò™Íô‹ªü˜ñ¡
ªñ£N‚è£ù String.xml
«î£¡P»œ÷¶. ðòù£
÷˜ ªü˜ñ¡ ªñ£NJ¬ù
ªñ£Nò£è «î˜‰ªî´ˆ
 â¡ù îèõ™èœ
F¬óJ™ «î£¡ø «õ‡
´‹ â¡ðî¬ù String.
xml ªè£´‚è «õ‡´‹.
Þî¬ù «ð£¡«ø fr (french) ñŸÁ‹ Ja
(Japenese) ªñ£N‚° ༠õ£‚Aì «õ‡´‹.
Þ‰î ªêò™Íô‹ res/values-de/strings/xml,
res/values-fr/string.xml, res/values-ja/strings.
xml ÝAò ç¬ð™èœ à¼õ£‚èŠð´‹. text-a
ñŸÁ‹ text-b -‚è£ù ªñ£NJ¬ù «î˜‰ªî´‚
°‹ ªñ£N‚° ãŸð ñ£Á‹ Strings.xml Gó™
è¬÷ 𣘊«ð£‹.
res/value-de/strings.xml-‚è£ù Gó™ Gó™
4-™ ªè£´‚èŠð†´œ÷¶. res/values-fr/strings.
xml-‚è£ù Gó™ 5-™ ªè£´‚èŠð†´œ÷¶.
res/values-ja/strings.xml -‚è£ù Gó™ ðì‹
12-™ 裇H‚èŠð†´œ÷¶. 嚪õ£¼
ªñ£N‚° ãŸð ªè£®J¬ù 裇H‚è
Drawable ç«ð£™ìK¬ù à¼õ£‚è «õ‡´‹.
German-res/drawable-de-rDE/flag.png
French-res/drawable-fr-rFR/flag.png
Canada-res/drawable-fr-rCA/Flag.png
Japan-res/drawable-ja-rJP/flag.png
Unitedstates-res/drawable-en-rUS/flag.png
嚪õ£¼ ªñ£N‚° ãŸø ®¡ ªè£®
J¬ù ܉î‰î ç«ð£™ìK™ «êIˆFì «õ‡
´‹. «êIˆî¾ì¡ ðì‹ 13-™ àœ÷¶ «ð£¡ø
F¬ó «î£¡Á‹. ÞŠ«ð£¶ ÜŠO«èê¬ù
ªêò™ð´ˆî Language â¡ðF™ Japan ªñ£N
J¬ù «î˜‰ªî´ˆî£™ ðì‹ 14-™ àœ÷¶
«ð£¡Á F¬ó «î£¡Á‹.

Weitere ähnliche Inhalte

Was ist angesagt?

Green Leaps - Chinese
Green Leaps - ChineseGreen Leaps - Chinese
Green Leaps - Chinesefrog
 
사이 프로그램 1학기
사이 프로그램 1학기사이 프로그램 1학기
사이 프로그램 1학기guest828b70e
 
The Role of Artists in Advancing Peace and Reunification of Korea
The Role of Artists in Advancing Peace and Reunification of KoreaThe Role of Artists in Advancing Peace and Reunification of Korea
The Role of Artists in Advancing Peace and Reunification of Korea정연진 Jean Chung
 
Brand Management through Social Media
Brand Management through Social MediaBrand Management through Social Media
Brand Management through Social MediaJuny Lee
 
المطهرات والتطهير (مهم)
المطهرات والتطهير (مهم)المطهرات والتطهير (مهم)
المطهرات والتطهير (مهم)AbdelRahman Yousef
 
3284627 c-in-tamil-
3284627 c-in-tamil-3284627 c-in-tamil-
3284627 c-in-tamil-Suresh Kumar
 
2008 Brading A Holistic View
2008 Brading A Holistic View2008 Brading A Holistic View
2008 Brading A Holistic ViewJin Lee
 
Top Ten SE Concepts V11.1 Jp
Top Ten SE Concepts V11.1 JpTop Ten SE Concepts V11.1 Jp
Top Ten SE Concepts V11.1 JpKenji Hiranabe
 
미코노미 2장
미코노미 2장미코노미 2장
미코노미 2장oganadang
 
구글을 지탱하는 기술
구글을 지탱하는 기술구글을 지탱하는 기술
구글을 지탱하는 기술semi06
 
iPhone Presentation
iPhone PresentationiPhone Presentation
iPhone PresentationVictor Choi
 
سورة الكهف منهجيات في الإصلاح والتغيير
سورة الكهف منهجيات في الإصلاح والتغييرسورة الكهف منهجيات في الإصلاح والتغيير
سورة الكهف منهجيات في الإصلاح والتغييرm_mosel
 
Me Economy(2)
Me   Economy(2)Me   Economy(2)
Me Economy(2)Miri Kim
 

Was ist angesagt? (20)

Hardware Interface in Android (in tamil)
Hardware Interface in Android (in tamil)Hardware Interface in Android (in tamil)
Hardware Interface in Android (in tamil)
 
Water tamil
Water tamilWater tamil
Water tamil
 
Green Leaps - Chinese
Green Leaps - ChineseGreen Leaps - Chinese
Green Leaps - Chinese
 
사이 프로그램 1학기
사이 프로그램 1학기사이 프로그램 1학기
사이 프로그램 1학기
 
The Role of Artists in Advancing Peace and Reunification of Korea
The Role of Artists in Advancing Peace and Reunification of KoreaThe Role of Artists in Advancing Peace and Reunification of Korea
The Role of Artists in Advancing Peace and Reunification of Korea
 
Brand Management through Social Media
Brand Management through Social MediaBrand Management through Social Media
Brand Management through Social Media
 
المطهرات والتطهير (مهم)
المطهرات والتطهير (مهم)المطهرات والتطهير (مهم)
المطهرات والتطهير (مهم)
 
3284627 c-in-tamil-
3284627 c-in-tamil-3284627 c-in-tamil-
3284627 c-in-tamil-
 
2008 Brading A Holistic View
2008 Brading A Holistic View2008 Brading A Holistic View
2008 Brading A Holistic View
 
3
33
3
 
Top Ten SE Concepts V11.1 Jp
Top Ten SE Concepts V11.1 JpTop Ten SE Concepts V11.1 Jp
Top Ten SE Concepts V11.1 Jp
 
미코노미 2장
미코노미 2장미코노미 2장
미코노미 2장
 
구글을 지탱하는 기술
구글을 지탱하는 기술구글을 지탱하는 기술
구글을 지탱하는 기술
 
최종Google3
최종Google3최종Google3
최종Google3
 
iPhone Presentation
iPhone PresentationiPhone Presentation
iPhone Presentation
 
Key boards
Key boardsKey boards
Key boards
 
9
99
9
 
Invilgangwon1
Invilgangwon1Invilgangwon1
Invilgangwon1
 
سورة الكهف منهجيات في الإصلاح والتغيير
سورة الكهف منهجيات في الإصلاح والتغييرسورة الكهف منهجيات في الإصلاح والتغيير
سورة الكهف منهجيات في الإصلاح والتغيير
 
Me Economy(2)
Me   Economy(2)Me   Economy(2)
Me Economy(2)
 

Andere mochten auch (20)

Guion
GuionGuion
Guion
 
Superb pictures
Superb picturesSuperb pictures
Superb pictures
 
Pizza Park
Pizza ParkPizza Park
Pizza Park
 
Odchudznie fakty i mity
Odchudznie fakty i mityOdchudznie fakty i mity
Odchudznie fakty i mity
 
Apresentação do painel cmei 2010
Apresentação do painel cmei 2010Apresentação do painel cmei 2010
Apresentação do painel cmei 2010
 
Codigo conducta
Codigo conductaCodigo conducta
Codigo conducta
 
Ilustracao43
Ilustracao43Ilustracao43
Ilustracao43
 
Предприниматель-инноватор: СОЗДАНИЕ БЫСТРОРАСТУЩЕГО БИЗНЕСА
Предприниматель-инноватор: СОЗДАНИЕ БЫСТРОРАСТУЩЕГО БИЗНЕСАПредприниматель-инноватор: СОЗДАНИЕ БЫСТРОРАСТУЩЕГО БИЗНЕСА
Предприниматель-инноватор: СОЗДАНИЕ БЫСТРОРАСТУЩЕГО БИЗНЕСА
 
infoBLOCSagunt Gener 2013
infoBLOCSagunt Gener 2013infoBLOCSagunt Gener 2013
infoBLOCSagunt Gener 2013
 
Company Profile Nurhaddad Kotamobagu
Company Profile Nurhaddad KotamobaguCompany Profile Nurhaddad Kotamobagu
Company Profile Nurhaddad Kotamobagu
 
1950 5054-1-pb
1950 5054-1-pb1950 5054-1-pb
1950 5054-1-pb
 
La netiqueta 02
La netiqueta 02La netiqueta 02
La netiqueta 02
 
El Método Científico
El Método CientíficoEl Método Científico
El Método Científico
 
Internet
InternetInternet
Internet
 
Success
SuccessSuccess
Success
 
Psychologia osiagniec
Psychologia osiagniecPsychologia osiagniec
Psychologia osiagniec
 
Kurios
KuriosKurios
Kurios
 
28489 45195
28489 4519528489 45195
28489 45195
 
Jak uczyc sie do egzaminow
Jak uczyc sie do egzaminowJak uczyc sie do egzaminow
Jak uczyc sie do egzaminow
 
Presentazione dell’archivio INSMLI
Presentazione dell’archivio INSMLIPresentazione dell’archivio INSMLI
Presentazione dell’archivio INSMLI
 

Mehr von Dr. Ramkumar Lakshminarayanan

Mehr von Dr. Ramkumar Lakshminarayanan (20)

IT security awareness
IT security awarenessIT security awareness
IT security awareness
 
Basics of IT security
Basics of IT securityBasics of IT security
Basics of IT security
 
IT Security Awareness Posters
IT Security Awareness PostersIT Security Awareness Posters
IT Security Awareness Posters
 
Normalisation revision
Normalisation revisionNormalisation revision
Normalisation revision
 
Windows mobile programming
Windows mobile programmingWindows mobile programming
Windows mobile programming
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Web technology today
Web technology todayWeb technology today
Web technology today
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
Phonegap for Android
Phonegap for AndroidPhonegap for Android
Phonegap for Android
 
Android app - Creating Live Wallpaper (tamil)
Android app - Creating Live Wallpaper (tamil)Android app - Creating Live Wallpaper (tamil)
Android app - Creating Live Wallpaper (tamil)
 
Android Animation (in tamil)
Android Animation (in tamil)Android Animation (in tamil)
Android Animation (in tamil)
 
Single Touch event view in Android (in tamil)
Single Touch event view in Android (in tamil)Single Touch event view in Android (in tamil)
Single Touch event view in Android (in tamil)
 
Android Application using seekbar (in tamil)
Android Application using seekbar (in tamil)Android Application using seekbar (in tamil)
Android Application using seekbar (in tamil)
 
Rating Bar in Android Example
Rating Bar in Android ExampleRating Bar in Android Example
Rating Bar in Android Example
 
Creating Image Gallery - Android app (in tamil)
Creating Image Gallery - Android app (in tamil)Creating Image Gallery - Android app (in tamil)
Creating Image Gallery - Android app (in tamil)
 
GPS in Android (in tamil)
GPS in Android (in tamil)GPS in Android (in tamil)
GPS in Android (in tamil)
 
SQLite in Android App (in tamil)
SQLite in Android App (in tamil)SQLite in Android App (in tamil)
SQLite in Android App (in tamil)
 
Shared Preference in Android App
Shared Preference in Android AppShared Preference in Android App
Shared Preference in Android App
 
Data Storage in Android App
Data Storage in Android AppData Storage in Android App
Data Storage in Android App
 
Notification in Android App (in tamil)
Notification in Android App (in tamil)Notification in Android App (in tamil)
Notification in Android App (in tamil)
 

Using many languages in single Android App (in tamil)

  • 1. ݇†ó£Œ´ ÜŠO «èê¡èœ ðô ®¬õv èœ ñŸÁ‹ ðô ªñ£N èO™ ðò¡ð´A¡øù. ༠õ£‚èŠð´‹ ÜŠO«èê¡èœ ªê™«ðC ðò¡ð´ˆ¶‹ ªñ£N‚° ãŸð îèõ™èœ, â‡èœ, Ý®«ò£ ç¬ð™èœ, ðí °Pf´èœ ñŸÁ‹ ð ì ƒ è¬÷ ñ£ŸP ܬñ‚è (Locales) ðò¡ð´Aø¶. ꣡ø£è â¡Â¬ìò ªê™«ðCJ¡ îèõ™ ªîK »‹ ªñ£NJ¬ù ¬õˆ ¶œ«÷¡. Üîù£™ ðì‹ -1™ îèõ™ ݃Aôˆ F½‹ ñŸÁ‹ HK†®w ªè£® F¬óJ™ «î£¡P »œ÷¶. Ü´ˆîî£è ðì‹-2 setting->Language Key board-™ ªñ£NJ¬ù ñ£ŸP ܬñ‚è º® »‹. (ðì‹-3) Þƒ° ªñ£NJ¬ù Germen ݇†ó£Œ®™ ðô ªñ£Nèœ ðò¡ð´ˆ¶‹ º¬ø! <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com /apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:text="@string/text_a" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:text="@string/text_b" /> <Button android:id="@+id/flag_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" /> </LinearLayout> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">Hello, L10N</string> <string name="text_a">Shall I compare thee to a summer"'"s day?</string> <string name="text_b">Thou art more lovely and more temperate.</string> <string name="dialog_title">No Localisation</string> <string name="dialog_text">This dialog box"'"s strings are not localised. For every locale, the text here will come from values/strings.xml.</string> </resources> Deutsch (Deutschland) ñ£ŸP ܬñ‚A«ø¡. e‡´‹ ÜŠO«èê¬ù ª ê ò ™ð ´ ˆ¶ ‹«ð £ ¶ ðì‹ 4-™ àœ÷¶ «ð£¡ø ªü˜ñ¡ ªñ£N ñŸÁ‹ F¬ó «î£¡Á‹. Þ¬î «ð£¡Á Langu age& Keyboard â¡ø «î˜ M¬ù English(Unite Sta tes) â¡Á ñ£ŸP ܬñˆ  ðì‹ 5-™ àœ÷¶ «ð£¡Á F¬ó «î£¡Á‹. Language&Keyboard â¡ø «î˜M¬ùFrancais(France) â¡Á ñ£ŸPù£™ ðì‹ 6-™ àœ÷¶ «ð£¡Á F¬ó «î£¡Á‹.  ༠õ£‚°‹ÜŠO«èꡫ ªî´‚èŠð´‹ ªñ£N‚° ãŸð ñ£Áî™ ãŸð´ñ£Á ܬñˆFì º®»‹. ðì‹-1 ðì‹-2 ðì‹-3 ðì‹-4Gó™-1 Gó™-2
  • 2. ÜŠO«èê¡ à¼ õ£‚°‹ «ð£¶, ªñ£N ‚° ãŸð îèõ™èœ, ðìƒèœñŸÁ‹ç¬ð™ è¬÷ «î˜‰ªî´‚è «õ‡´‹. ÜŠO«èê¡ ªêò™ ð´‹«ð£¶,«î˜‰ªî´‚ èŠð†´œ÷ªñ£N‚° ãŸð îèõ™èœ, ðìƒ èœ ñŸÁ‹ ç¬ð™ è¬÷ 裇H‚è «õ‡ ´‹. Localization ꣘‰î ÜŠO«èê¡ à¼õ£‚°‹ «ð£¶ F†ìI´î™ º‚Aòñ£ù ªêòô£°‹. ݇†ó£Œ´ Í¡Á Mîñ£ù K«ê£˜v ç¬ð™è¬÷ ðò¡ð´ˆ¶A¡ø¶. ܬõ, res/drawable, res/layout ñŸÁ‹ res/ value à¼õ£‚èŠ «ð£°‹ ÜŠO«èê¡ Þó‡´ ªì‚v† MÎ ñŸÁ‹ ð†ì¡ ªè£‡®¼‚ °‹ ð†ì¬ù AO‚ ªêŒî¾ì¡ îèõ™ F¬óJ™ «î£¡Á ñ£Á à¼õ£‚èŠ «ð£A«ø£‹. ¯ç𣙆 ªñ£N ò£è British, English ñŸÁ‹ Default Loca tion (Þì‹) United Kingdom â¡Á «î˜‰ ªî´ˆ¶ ªè£œÀƒ èœ. à¼õ£‚èŠ Ý¡†ó£Œ´ -2 Þ󣋰ñ£˜ ªô†²Iï£ó£òí¡ 11 package com.ram.helloln; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.view.View; import android.widget.*; public class HelloLNActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button b; (b = (Button)findViewById(R.id.flag_button)).setBa ckgroundDrawable(this.getResources().getDra wable(R.drawable.flag)); // build dialog box to display when user clicks the flag AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.dialog_text) .setCancelable(false) .setTitle(R.string.dialog_title) .setPositiveButton("Done", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); } }); final AlertDialog alert = builder.create(); // set click listener on the flag to show the dialog box b.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { alert.show(); } }); } } ðì‹-5 ðì‹-6 ðì‹-8 Gó™-3
  • 3. ðì‹-7 ðì‹-9 ðì‹-10 ðì‹-12 «ð£°‹ ÜŠO«èê¡ ªè£´ˆ¶ ªî£ìƒè «õ‡´‹. W›è‡ì îèõ™è¬÷ ªè£´ˆ¶ ªî£ìƒè «õ‡´‹. Project Name:Hello 10N Application Name: Hello, LION Package Name: com.ram.hello10n Create Activity:HelloLION Min SDK Version:3 res/layout/main/.xml-L™ ªì‚v† MÎ ñŸÁ‹ ð†ì¡ à¼õ£‚è Gó™ 1-™ àœ÷ Gó™è¬÷ ðò¡ð´ˆî «õ‡´‹. Ü´ˆîî£è ÜŠO«èê‚° «î¬õò£ù String.xml ç¬ðL¬ù à¼õ£‚è «õ‡´‹. Þƒ° "text-a", "text-b", "dialog-title", "dialog- text" «ð£¡ø¬õ‚è£ù îèõ™ â¡ù «î£¡ø «õ‡´‹ â¡ðîŸè£ù îèõ™ ªè£´‚A«ø£‹. ÞîŸè£ù Gó™ -2™ àœ÷¶. ªñ£N‚° ãŸð ªè£® ñ£ø «õ‡´‹. Üîù£™ Default Ýè drawable-hdpi â¡ø ç«ð£™ìK™ developer.android.com/ images/ hello-l10n/flag.png Ü™ô¶ «õÁ Þ¬íò î÷ˆFL¼‰«î HK†®w ªè£®J¬ù flag. png â¡ø ªðòK™ «î˜‰ªî´ƒèœ. main.xml ïñ¶ «ôܾ† ç¬ðô£°‹ ÞîŸ è£ù Ý‚®M†® ç¬ðL¬ù à¼õ£‚è «õ‡ ´‹. HelloLNActivity -‚è£ù Gó™ -3 ™
  • 4. <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">Hallo, Lokalisierung</string> <string name="text_a">Soll ich dich einem Sommertag vergleichen,</string> <string name="text_b">Der du viel lieblicher und sanfter bist?</string> </resources> <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">Bonjour, Localisation</string> <string name="text_a">Irai-je te comparer au jour d'été?</string> <string name="text_b">Tu es plus tendre et bien plus tempéré.</string> </resources> - ªî£ì¼‹ ðì‹-11 ðì‹-14 ðì‹-13 Gó™-5Gó™-4 ªè£´‚èŠð†´œ÷¶. ªè£´‚èŠð†´œ÷ Gó™ ð†ìQŸ° H¡ùEJ¬ù ܬñˆF´‹. ð†ì¬ù AO‚ ªêŒî¾ì¡ Alert Dialog J¬ù  ªñ£N‚° ãŸð ñ£ŸP ܬñ‚èŠ «ð£õF™¬ô. Üîù£™ dialog-text Ýù¶ res/values/string/.xml â¡ø ç¬ðL™ àœ÷ îèõ¬ô 裇H‚°‹. ðì‹-7 ™ àœ÷¶ «ð£¡Á ªñ£N‚° ãŸð «î˜‰ªî´‚°‹ º¬øJ¬ù ܬñˆFì «õ‡´‹. ÜîŸè£ù õNº¬øè¬÷ 𣘊«ð£‹. ðì‹ 8-™ ªñ£N‚° ãŸð îèõ™èœ ⃰ «êI‚èŠðì «õ‡´‹ â¡ðî¬ù °P‚Aø¶. ꣡ø£è ªü˜ñ¡ ªñ£N‚° ãŸð õ®õ¬ñ‚è Local -code de-rDt â¡ðî¬ù ðò¡ð´ˆî «õ‡´‹. ªü˜ñQ‚° string.xml ç¬ðL¬ù res/ value-de â¡ø ç«ð£™ìK™ «êIˆFì «õ‡ ´‹. ºîL™ File>New>AndroidXML File â¡ð  «î˜‰ªî´‚è «õ‡´‹. (ðì‹-9) Ü´ˆ¶ Hó£ªü‚† â¡ð HelloL10N â¡ð¶ «î˜‰ªî´‚èŠð†®¼‚°‹. File â¡ð  String.xml â¡Á ªè£´‚è «õ‡´‹. H¡ ù˜ Language â¡ðî¬ù «î˜‰ªî´‚è «õ‡´‹. (ðì‹-10) H¡ù˜ Language â¡ø «î˜MŸ° de â¡Á ªè£´ ‚è «õ‡´‹. (ðì‹ 11) Þ‰î ªêò™Íô‹ªü˜ñ¡ ªñ£N‚è£ù String.xml «î£¡P»œ÷¶. ðòù£ ÷˜ ªü˜ñ¡ ªñ£NJ¬ù ªñ£Nò£è «î˜‰ªî´ˆ  â¡ù îèõ™èœ F¬óJ™ «î£¡ø «õ‡ ´‹ â¡ðî¬ù String. xml ªè£´‚è «õ‡´‹. Þî¬ù «ð£¡«ø fr (french) ñŸÁ‹ Ja (Japenese) ªñ£N‚° ༠õ£‚Aì «õ‡´‹. Þ‰î ªêò™Íô‹ res/values-de/strings/xml, res/values-fr/string.xml, res/values-ja/strings. xml ÝAò ç¬ð™èœ à¼õ£‚èŠð´‹. text-a ñŸÁ‹ text-b -‚è£ù ªñ£NJ¬ù «î˜‰ªî´‚ °‹ ªñ£N‚° ãŸð ñ£Á‹ Strings.xml Gó™ è¬÷ 𣘊«ð£‹. res/value-de/strings.xml-‚è£ù Gó™ Gó™ 4-™ ªè£´‚èŠð†´œ÷¶. res/values-fr/strings. xml-‚è£ù Gó™ 5-™ ªè£´‚èŠð†´œ÷¶. res/values-ja/strings.xml -‚è£ù Gó™ ðì‹ 12-™ 裇H‚èŠð†´œ÷¶. 嚪õ£¼ ªñ£N‚° ãŸð ªè£®J¬ù 裇H‚è Drawable ç«ð£™ìK¬ù à¼õ£‚è «õ‡´‹. German-res/drawable-de-rDE/flag.png French-res/drawable-fr-rFR/flag.png Canada-res/drawable-fr-rCA/Flag.png Japan-res/drawable-ja-rJP/flag.png Unitedstates-res/drawable-en-rUS/flag.png 嚪õ£¼ ªñ£N‚° ãŸø ®¡ ªè£® J¬ù ܉î‰î ç«ð£™ìK™ «êIˆFì «õ‡ ´‹. «êIˆî¾ì¡ ðì‹ 13-™ àœ÷¶ «ð£¡ø F¬ó «î£¡Á‹. ÞŠ«ð£¶ ÜŠO«èê¬ù ªêò™ð´ˆî Language â¡ðF™ Japan ªñ£N J¬ù «î˜‰ªî´ˆî£™ ðì‹ 14-™ àœ÷¶ «ð£¡Á F¬ó «î£¡Á‹.