Yes, you can achieve it using I18nManager. import {I18nManager} from 'react-native' ... I18nManager.forceRTL(true) // forceRLT: boolean
@gauthamvijayan
Ай бұрын
Perfect!
@shamshad_hussain
7 ай бұрын
daammnnn this is what i need. thank you.
@riahiyassine7703
5 ай бұрын
Helpful content... great thanks
@NashrinFathima-oh7ji
Ай бұрын
Very Helpful
@gauthamvijayan
Ай бұрын
Also try to mix react-native-localise with this video as part 2
@ibrahimcelen1896
3 ай бұрын
Danke Schön bruddah!
@MaheshRajan-ly7vm
7 ай бұрын
When I close the app and reopen it, will it show the default language (en), right? How can we display the last selected language when reopening the application using AsyncStorage?
@sameersingh-gb1gy
7 ай бұрын
i am also trying the same from last 3 days please reply here if you get any solution
@MaheshRajan-ly7vm
7 ай бұрын
Yeah, I got it, Screen One const changeLangFunc = async (lng) => { await AsyncStorage.setItem('selectedLanguage', lng); // Store the selected language i18next.changeLanguage(lng) setLangModal(false) } set the selected lang in an asyncStorage screen two, In the screen where we call the functions to execute the changes added the below code, const setInitialLanguage = async () => { try { const selectedLanguage = await AsyncStorage.getItem('selectedLanguage'); if (selectedLanguage) { i18next.changeLanguage(selectedLanguage); } } catch (error) { console.error('Error retrieving selected language:', error); } }; setInitialLanguage(); // Set the initial language on application startup @@sameersingh-gb1gy
@_NguyenKhacLoc
Ай бұрын
@@MaheshRajan-ly7vm ty man
@user-pm5ny9ec9k
4 ай бұрын
Is there any way to change whole app languate in single click. instead of writting a alternate word for each word. I dont know, but just a thought. like by using google translate or any other api ?
@vishalpwr
4 ай бұрын
One way is you can send this file with your selected language to your server and the server will give you the response of the translated file. For dynamic data it works well. And another way you can use any third party API to translate your text.
@stilljunior1764
4 ай бұрын
ERROR TypeError: Cannot read property 'language' of undefined, js engine: hermes when I am trying to change language
@vishalpwr
4 ай бұрын
Please check, have you installed/configured library correctly? And to change language you can use import { useTranslation } from 'react-i18next' const { t, i18n } = useTranslation(); i18n.changeLanguage('fr')
@mariapaoladigrigoli9506
3 ай бұрын
Thank u!!
@vishalpwr
3 ай бұрын
Welcome 😊
@BukkyOdunsi
5 ай бұрын
Does it mean you'd have to input the translations manually?
@vishalpwr
5 ай бұрын
Yes, for static texts! For dynamic or api based data/text it requires translation from api or need to add some extra efforts.
@arktutorials9866
3 ай бұрын
is their any automation available?
@AlbertGorgori
4 ай бұрын
Which styling library are you using?
@vishalpwr
4 ай бұрын
I’m not using any third party library for styling.
@marcelraszewski
4 ай бұрын
What extension do you have that sugest you evreything when you are writting code ??
@vishalpwr
4 ай бұрын
I have installed many extensions but you can try these... Auto import "React Native Tools" Auto complete Tag
@vrto3287
3 ай бұрын
How can I show last selected language when reopening the app ?
@vishalpwr
2 ай бұрын
For that you need to persist your selected language in any local storage like AsyncStorge or you can find any other solution to persist user prefs.
@shubhamsood589
7 ай бұрын
How to do RTL ? Layout is not shifting without refreshing app
@vishalpwr
7 ай бұрын
Have you tried with, Pinned comment's answer?
@shubhamsood589
6 ай бұрын
@@vishalpwr, yes ! Language changes but layout is not shifted. Can you show it in another tutorial please.
@yucelduz4897
5 ай бұрын
does it work with expo
@vishalpwr
5 ай бұрын
Yes, i18next and react-i18next absolutely works with Expo.
@prashlovessamosa
7 ай бұрын
Bro again forgot yt password
@vishalpwr
6 ай бұрын
😔
@abdullahaboayesha
6 ай бұрын
The music is freaking stressing me out , had to stop in the middle of tutorial :(
Пікірлер: 36