1
00:00:00,240 --> 00:00:05,390
So now I want to show you how you can actually localize your Android applications.

2
00:00:05,520 --> 00:00:09,250
So let's actually open our Android structure.

3
00:00:09,270 --> 00:00:15,180
So just click on this view tool windows and then click on Project and he and as you can see this is

4
00:00:15,270 --> 00:00:17,320
our project structure.

5
00:00:17,370 --> 00:00:24,270
So just as you can see here inside the folder and inside these values folder we have these strings that

6
00:00:24,360 --> 00:00:25,290
exemplified.

7
00:00:25,350 --> 00:00:31,050
So just double click on this file here and here as you can see it's actually publicly and it's strings

8
00:00:31,290 --> 00:00:37,630
that XML file a tab here and as you can see so here as you can see this is the strings that exemplified.

9
00:00:37,980 --> 00:00:42,800
And here we have this tag for it the application name app name app 59.

10
00:00:42,900 --> 00:00:43,800
Right.

11
00:00:43,800 --> 00:00:47,930
So here at the top as you can see we have these values open Ed..

12
00:00:48,030 --> 00:00:52,760
So just click on this open editor here and this window is actually open.

13
00:00:52,810 --> 00:00:55,070
Translations editor right.

14
00:00:55,410 --> 00:00:58,500
Which as you can see here we have some keys and values.

15
00:00:58,500 --> 00:01:03,590
The key is for example app name and the value is for example app 59.

16
00:01:03,770 --> 00:01:10,200
So you can actually change these values to other values on here if you want to actually add an order

17
00:01:11,430 --> 00:01:14,520
for example and other language to your application.

18
00:01:14,520 --> 00:01:20,820
For example I want to actually show my application to another user.

19
00:01:20,940 --> 00:01:24,740
For example the nationality of my user that is actually Germany.

20
00:01:24,790 --> 00:01:31,860
I can actually design my application to show to the values the string values of my application to that

21
00:01:31,860 --> 00:01:34,480
specific language of the user.

22
00:01:34,500 --> 00:01:39,720
So just click on this button here as you can see we have this at local button here and as you can see.

23
00:01:39,720 --> 00:01:40,240
Right.

24
00:01:40,290 --> 00:01:41,450
So just click on this.

25
00:01:41,520 --> 00:01:45,150
And here we can actually see all the countries.

26
00:01:45,150 --> 00:01:47,680
So here I can actually search for Germany.

27
00:01:48,030 --> 00:01:50,530
And he and as you can see we have this gentleman here right.

28
00:01:50,610 --> 00:01:53,700
Just selected for the for the Germany translation.

29
00:01:53,700 --> 00:01:55,380
I had actually put another value.

30
00:01:55,470 --> 00:02:00,210
For example I can actually put for example a for the German translation.

31
00:02:00,240 --> 00:02:07,000
So if the language of the device of the use that is actually to Germany this value is going to be assigned

32
00:02:07,020 --> 00:02:08,540
for the application name.

33
00:02:08,790 --> 00:02:14,010
OK instead of at 59 you're going to see this a value a.

34
00:02:14,180 --> 00:02:14,700
OK.

35
00:02:14,940 --> 00:02:17,670
So if you actually want to add other values.

36
00:02:17,670 --> 00:02:21,630
So now let's actually run our project and see what happens.

37
00:02:21,630 --> 00:02:27,100
So just click on this one button here and then here you can actually select a device.

38
00:02:27,360 --> 00:02:33,840
So if you have or if you don't have a device that that that is actually running the Android 7 AP I-24

39
00:02:34,050 --> 00:02:37,430
you need to create a new virtual virtual device.

40
00:02:37,470 --> 00:02:40,330
So just click on this create new virtual device.

41
00:02:40,680 --> 00:02:43,760
And here we can see these devices as you can see here.

42
00:02:43,770 --> 00:02:48,710
So here as you can see you can actually select this one and then click on next.

43
00:02:48,990 --> 00:02:53,220
And as you can see this device is actually running Android 7 as you can see here.

44
00:02:53,220 --> 00:02:56,930
AP ilevel 24 Android open source project.

45
00:02:56,940 --> 00:02:58,900
And then you can actually click on next.

46
00:02:59,310 --> 00:03:05,710
And here you can actually change some of these some of these properties or you can actually change the

47
00:03:05,700 --> 00:03:08,020
set advanced settings.

48
00:03:08,310 --> 00:03:09,810
And then click on finish.

49
00:03:09,810 --> 00:03:14,910
So if you want to you can actually leave it as default and then click on finish and your new device

50
00:03:14,910 --> 00:03:16,340
is going to be created.

51
00:03:16,560 --> 00:03:21,320
But because I actually or I or I already created this device here.

52
00:03:21,510 --> 00:03:25,260
I can actually select this device and then I click on OK here.

53
00:03:25,680 --> 00:03:28,470
So let's actually wait and see here.

54
00:03:28,470 --> 00:03:34,680
So as you can see here my application is running on this emulator and it says welcome to intermediate

55
00:03:34,710 --> 00:03:36,690
Android programming section.

56
00:03:36,690 --> 00:03:40,310
So let's let's change the language of the device.

57
00:03:40,470 --> 00:03:49,380
So let's click on this home button here and then click on the menu button and here let's actually click

58
00:03:49,380 --> 00:03:56,720
on the Settings app here as you can see and then let's actually find the language and input here and

59
00:03:56,730 --> 00:03:59,570
as you can see language and put click on it.

60
00:04:00,030 --> 00:04:03,330
And here as you can see we have these languages here right.

61
00:04:03,330 --> 00:04:05,200
Just click on it here.

62
00:04:05,220 --> 00:04:07,990
So now let's actually add another language.

63
00:04:08,400 --> 00:04:16,180
So let's add our language here and here I just need to search for the specific language for my device.

64
00:04:16,200 --> 00:04:21,000
So I just need to search here I just need to click on the search button here and here I can just search

65
00:04:21,000 --> 00:04:22,130
for Germany.

66
00:04:22,560 --> 00:04:25,190
And here I can choose this one Dutch right.

67
00:04:25,290 --> 00:04:29,770
Just choose this one here and here as you can see it just.

68
00:04:29,820 --> 00:04:34,160
So let's start here and here as you can see we have this Dutch language here.

69
00:04:34,170 --> 00:04:34,880
Right.

70
00:04:34,950 --> 00:04:40,170
So now I need to actually make this language this Dutch language the first language.

71
00:04:40,200 --> 00:04:45,820
So the first language is English right english United States and the second language is Dutch.

72
00:04:45,870 --> 00:04:50,610
So I just need to isolate this one here as you can see this area of this item as you can see I just

73
00:04:50,610 --> 00:04:56,590
need to select it and I just need to drag it and put it here as the first item in this list.

74
00:04:56,940 --> 00:05:00,600
So now the main language of the device is actually the that.

75
00:05:00,780 --> 00:05:01,320
Right.

76
00:05:01,320 --> 00:05:04,590
So let's actually go back to our Android application here.

77
00:05:04,740 --> 00:05:08,650
Now as you can see here the name of my application is changed.

78
00:05:08,790 --> 00:05:11,580
And as you can see we have disvalue a.

79
00:05:11,790 --> 00:05:14,510
So let's go back to our strengths that exemplified here.

80
00:05:14,700 --> 00:05:17,820
As you can see the name of our application is at 59.

81
00:05:17,820 --> 00:05:25,230
So while this is a because insight is translation editor here and here I actually specified that if

82
00:05:25,740 --> 00:05:31,710
the main language of the device is actually Dutch as you can see I choose I chose this country gentleman

83
00:05:31,700 --> 00:05:32,380
right.

84
00:05:32,580 --> 00:05:37,500
And I said that if the main language of the device is actually Dutch then it's going to actually choose

85
00:05:37,640 --> 00:05:39,440
this value for the application name.

86
00:05:39,460 --> 00:05:42,240
Apni So what about this value here.

87
00:05:42,240 --> 00:05:45,080
This of the value of this text view.

88
00:05:45,090 --> 00:05:48,040
Welcome to intermediate and reprograming section.

89
00:05:48,360 --> 00:05:52,350
So in that case in that specific case I need to put this value.

90
00:05:52,440 --> 00:05:57,310
This will welcome to android when it comes to intermediate Android programming section text.

91
00:05:57,330 --> 00:06:03,300
I need to put this value here inside these strings that exemplified So here inside these resources that

92
00:06:03,590 --> 00:06:09,820
are just in it to create another attack here just put an opening tag here and here I just need type.

93
00:06:09,870 --> 00:06:11,000
Strange.

94
00:06:11,490 --> 00:06:12,750
And for the name.

95
00:06:12,750 --> 00:06:20,550
I can just type in Welkom underlined text and then I need to close the stack so he can see inside these

96
00:06:20,550 --> 00:06:21,030
packs.

97
00:06:21,030 --> 00:06:31,590
I can just type in welcome to intermediate inter mediate Android programming section.

98
00:06:31,590 --> 00:06:36,140
So now we have disvalue here and the name of this value is welcome text.

99
00:06:36,180 --> 00:06:40,190
So let's go back to our activity underlayment at examen here.

100
00:06:40,260 --> 00:06:46,280
So here as you can see for the text of this takes you as you can see we are actually inside this takes

101
00:06:46,300 --> 00:06:47,520
tap here right.

102
00:06:47,520 --> 00:06:53,580
So here this is our test view and I need to actually change this value because we are actually hard

103
00:06:53,580 --> 00:06:55,840
coding this string value here.

104
00:06:55,860 --> 00:07:03,000
So instead of hard coding this thing value it's better to actually put a specific address to a string

105
00:07:03,000 --> 00:07:05,530
value inside the strings that exemplified.

106
00:07:05,760 --> 00:07:11,280
So inside this activity and I mean that I well I just need to delete this text here and here I can just

107
00:07:11,280 --> 00:07:18,840
type in add sine strings and here as you can see the autocomplete feature of this android studio ID

108
00:07:19,080 --> 00:07:23,470
is helping me to choose these values app name and welcome context.

109
00:07:23,640 --> 00:07:27,330
So I put this welcome text inside these strings that exemplify it right.

110
00:07:27,330 --> 00:07:32,400
So here I just need to select like spot here and if I go back to the Design tab here now you can see

111
00:07:32,400 --> 00:07:33,360
this value here.

112
00:07:33,480 --> 00:07:34,580
Welcome to Android.

113
00:07:34,740 --> 00:07:37,230
Welcome to intermediate Andalus programming section.

114
00:07:37,230 --> 00:07:39,070
Right so here we have this value.

115
00:07:39,270 --> 00:07:44,800
And if I go back into this translation editor here we have another item here.

116
00:07:44,910 --> 00:07:47,390
So here as you can see we have another item.

117
00:07:47,460 --> 00:07:52,740
And as you can see here the color of this value is actually the red and this means that we haven't actually

118
00:07:52,740 --> 00:07:56,730
provided a translation for this value.

119
00:07:56,730 --> 00:07:59,580
Welcome to intermediate and reprogram section for this.

120
00:07:59,700 --> 00:08:00,530
Germany right.

121
00:08:00,530 --> 00:08:01,590
For this German.

122
00:08:01,680 --> 00:08:08,490
So here I can just type in the main if I can actually specify that if the main language of the device

123
00:08:08,490 --> 00:08:12,630
is actually Dutch I can just type in for example disvalue.

124
00:08:12,770 --> 00:08:13,380
OK.

125
00:08:13,500 --> 00:08:17,390
This value is going to be specified for this takes real world context.

126
00:08:17,520 --> 00:08:21,510
So if I press an energy on my keyboard and if I run my project again here.

127
00:08:21,840 --> 00:08:24,060
So now let's actually see what's going on here.

128
00:08:24,060 --> 00:08:28,730
Now as you can see it can actually run my application on this device.

129
00:08:28,740 --> 00:08:32,550
And as you can see here we have this value for this spell context here.

130
00:08:32,730 --> 00:08:38,730
And this means as you can see here the main language of the device is actually touch and I put this

131
00:08:38,730 --> 00:08:45,990
value here in order to actually show you that if you want to actually localize your Android that occasions

132
00:08:46,410 --> 00:08:47,480
this is how you do it.

133
00:08:47,600 --> 00:08:52,240
OK so now as you can see it because the main language of the device is actually touch.

134
00:08:52,290 --> 00:08:58,410
I actually decided to put these values but if I actually changed the main language of the device to

135
00:08:58,420 --> 00:09:00,820
add to English United States.

136
00:09:00,990 --> 00:09:07,800
So here I need to actually specify that this language English United States is going to be the main

137
00:09:07,800 --> 00:09:08,310
language.

138
00:09:08,310 --> 00:09:16,200
So I just need to select this area of this item here and here I can just put this language as the first

139
00:09:16,200 --> 00:09:17,660
language that it was.

140
00:09:17,670 --> 00:09:24,790
So if I open my application again now as you can see here we have this app 59 and we have this text.

141
00:09:24,790 --> 00:09:28,020
Welcome to intermediate Android programming section.

142
00:09:28,380 --> 00:09:33,020
So hopefully that makes sense and I think that's enough for this year.

143
00:09:33,100 --> 00:09:38,520
Also if you have any questions please post the discussion in the course and then I'll do my best to

144
00:09:38,520 --> 00:09:40,100
answer all of your questions.

145
00:09:40,260 --> 00:09:43,540
Thank you very much for watching and I'll see you in the next year Tauriel.

