So now I want to show you how you can actually localize your Android applications.
So let's actually open our Android structure.
So just click on this view tool windows and then click on Project and he and as you can see this is
our project structure.
So just as you can see here inside the folder and inside these values folder we have these strings that
exemplified.
So just double click on this file here and here as you can see it's actually publicly and it's strings
that XML file a tab here and as you can see so here as you can see this is the strings that exemplified.
And here we have this tag for it the application name app name app 59.
Right.
So here at the top as you can see we have these values open Ed..
So just click on this open editor here and this window is actually open.
Translations editor right.
Which as you can see here we have some keys and values.
The key is for example app name and the value is for example app 59.
So you can actually change these values to other values on here if you want to actually add an order
for example and other language to your application.
For example I want to actually show my application to another user.
For example the nationality of my user that is actually Germany.
I can actually design my application to show to the values the string values of my application to that
specific language of the user.
So just click on this button here as you can see we have this at local button here and as you can see.
Right.
So just click on this.
And here we can actually see all the countries.
So here I can actually search for Germany.
And he and as you can see we have this gentleman here right.
Just selected for the for the Germany translation.
I had actually put another value.
For example I can actually put for example a for the German translation.
So if the language of the device of the use that is actually to Germany this value is going to be assigned
for the application name.
OK instead of at 59 you're going to see this a value a.
OK.
So if you actually want to add other values.
So now let's actually run our project and see what happens.
So just click on this one button here and then here you can actually select a device.
So if you have or if you don't have a device that that that is actually running the Android 7 AP I-24
you need to create a new virtual virtual device.
So just click on this create new virtual device.
And here we can see these devices as you can see here.
So here as you can see you can actually select this one and then click on next.
And as you can see this device is actually running Android 7 as you can see here.
AP ilevel 24 Android open source project.
And then you can actually click on next.
And here you can actually change some of these some of these properties or you can actually change the
set advanced settings.
And then click on finish.
So if you want to you can actually leave it as default and then click on finish and your new device
is going to be created.
But because I actually or I or I already created this device here.
I can actually select this device and then I click on OK here.
So let's actually wait and see here.
So as you can see here my application is running on this emulator and it says welcome to intermediate
Android programming section.
So let's let's change the language of the device.
So let's click on this home button here and then click on the menu button and here let's actually click
on the Settings app here as you can see and then let's actually find the language and input here and
as you can see language and put click on it.
And here as you can see we have these languages here right.
Just click on it here.
So now let's actually add another language.
So let's add our language here and here I just need to search for the specific language for my device.
So I just need to search here I just need to click on the search button here and here I can just search
for Germany.
And here I can choose this one Dutch right.
Just choose this one here and here as you can see it just.
So let's start here and here as you can see we have this Dutch language here.
Right.
So now I need to actually make this language this Dutch language the first language.
So the first language is English right english United States and the second language is Dutch.
So I just need to isolate this one here as you can see this area of this item as you can see I just
need to select it and I just need to drag it and put it here as the first item in this list.
So now the main language of the device is actually the that.
Right.
So let's actually go back to our Android application here.
Now as you can see here the name of my application is changed.
And as you can see we have disvalue a.
So let's go back to our strengths that exemplified here.
As you can see the name of our application is at 59.
So while this is a because insight is translation editor here and here I actually specified that if
the main language of the device is actually Dutch as you can see I choose I chose this country gentleman
right.
And I said that if the main language of the device is actually Dutch then it's going to actually choose
this value for the application name.
Apni So what about this value here.
This of the value of this text view.
Welcome to intermediate and reprograming section.
So in that case in that specific case I need to put this value.
This will welcome to android when it comes to intermediate Android programming section text.
I need to put this value here inside these strings that exemplified So here inside these resources that
are just in it to create another attack here just put an opening tag here and here I just need type.
Strange.
And for the name.
I can just type in Welkom underlined text and then I need to close the stack so he can see inside these
packs.
I can just type in welcome to intermediate inter mediate Android programming section.
So now we have disvalue here and the name of this value is welcome text.
So let's go back to our activity underlayment at examen here.
So here as you can see for the text of this takes you as you can see we are actually inside this takes
tap here right.
So here this is our test view and I need to actually change this value because we are actually hard
coding this string value here.
So instead of hard coding this thing value it's better to actually put a specific address to a string
value inside the strings that exemplified.
So inside this activity and I mean that I well I just need to delete this text here and here I can just
type in add sine strings and here as you can see the autocomplete feature of this android studio ID
is helping me to choose these values app name and welcome context.
So I put this welcome text inside these strings that exemplify it right.
So here I just need to select like spot here and if I go back to the Design tab here now you can see
this value here.
Welcome to Android.
Welcome to intermediate Andalus programming section.
Right so here we have this value.
And if I go back into this translation editor here we have another item here.
So here as you can see we have another item.
And as you can see here the color of this value is actually the red and this means that we haven't actually
provided a translation for this value.
Welcome to intermediate and reprogram section for this.
Germany right.
For this German.
So here I can just type in the main if I can actually specify that if the main language of the device
is actually Dutch I can just type in for example disvalue.
OK.
This value is going to be specified for this takes real world context.
So if I press an energy on my keyboard and if I run my project again here.
So now let's actually see what's going on here.
Now as you can see it can actually run my application on this device.
And as you can see here we have this value for this spell context here.
And this means as you can see here the main language of the device is actually touch and I put this
value here in order to actually show you that if you want to actually localize your Android that occasions
this is how you do it.
OK so now as you can see it because the main language of the device is actually touch.
I actually decided to put these values but if I actually changed the main language of the device to
add to English United States.
So here I need to actually specify that this language English United States is going to be the main
language.
So I just need to select this area of this item here and here I can just put this language as the first
language that it was.
So if I open my application again now as you can see here we have this app 59 and we have this text.
Welcome to intermediate Android programming section.
So hopefully that makes sense and I think that's enough for this year.
Also if you have any questions please post the discussion in the course and then I'll do my best to
answer all of your questions.
Thank you very much for watching and I'll see you in the next year Tauriel.