Hello, last video I show you how you can apply localization into rediff application and we apply to language English and Arabic as you can see, but the problem was once you switch the language to other language not a default language like Arabic And if you navigate to another page, it will return you back again to the default language. So in this video, I will show you how you can keep your selected language between all bitches it's the back again to our code here, this is a function which makes a switch the English link will send in and as I told you before that I store this in decision scope. So, this is the most important things that you should store it in decision scope. After that we will use it somewhere now as I will show you so here I will create another function call public string get the current locale This function will return what is the current locale now and it will get it from the session scope, because once a user switch the language are used to the selected language into the session scope.
So, here I will need to return it So, I will return string and I will get the value from the session scope here I create a function to get the value from decision scope just since the key and this function will return the value inside this key. So, I will say get from session and out my key is this is my key which is blank. I will set it here. Okay. So, again once again making the switch between the language in our applications are two language what your your application can support multiple languages as you want. So, once a user switches the language use to this language in the variable Association school for example call length I would store this here then I will create another function I will return the current locale and I will read the value from this Lang key to return what is the current language now, this is the first system Second thing I will go for the each value page for example v one the free speech and they would say like to hear the view and go to Bora Bertie.
I will find here there are some so called local I need to point to my current locale here so that it will know the beach will know what is the current locale now, so, I will add the expression builder and I will go to my manage PDF Been I found my bean and I find here current local I will copy this is same in the other page view and I will point it to my local as well. So now each page will know what is the current locale and we will get it from decision scope. So, each beginner will know what is the current language and it will keep it as a current language. So, let us now try to stop and run and this is Okay, so let's noticed or you switch that finish speech to be in Arabic. After that I will go to the second page.
Now I am in the second page and it's the same in Arabic to the fullest which again. So now each page will get the value from the session scope and it will find it is in Arabic so it will keep in Arabic. If I switch it to English back to the English we want to find here it is in English as you can see. So now I can keep my current language between all pages. This is how you can apply localization into your ADF application because the video will jump for new feature So, see you next activity