it sounds like it is an Eslint warning, you have an array with 2 elements as return, so you can change const [t, i18n] = useTranslation('global'); for const t= useTranslation('global')[0]; instead, to avoid this assignment that is not used
How can I handle values coming from api, is there any way we can handle that response value? and change the language into selected language in frontend
import React from 'react'; import { useTranslation } from 'react-i18next'; function MyComponent() { const { t, i18n } = useTranslation(); // Get the current language const currentLanguage = i18n.language; return (
My left ear really enjoyed this video
😂
🤣
I thought my headphone was broken 🤣
Much better than the documentation, thanks
thanks for the video, really easy to follow and useful
This was very useful. Thanks, keep it up!
simple fast great video. Thank you.
Thank u very much! That worked perfectly for me!
Thaanks man, this looks helpful !
You should give us more new useful videos. Please don't stop. Thanks
Thanks for the encouragement, will post new videos starting this week
Awesome!
src\component\Home.js
Line 4:14: 'i18n' is assigned a value but never used no-unused-vars
help
it sounds like it is an Eslint warning, you have an array with 2 elements as return, so you can change
const [t, i18n] = useTranslation('global');
for
const t= useTranslation('global')[0];
instead, to avoid this assignment that is not used
How can I handle values coming from api, is there any way we can handle that response value? and change the language into selected language in frontend
do you find any solution
did you find any solution ? please 🙏🙏
Get data from api and replace the file
You're definitely Venezuelan bro. nice video man!!
I'm mexican but close! Thanks!
very min video very best video
Thanks man. Very straight forward. Can you tell how to check the current language or the active one ?
import React from 'react';
import { useTranslation } from 'react-i18next';
function MyComponent() {
const { t, i18n } = useTranslation();
// Get the current language
const currentLanguage = i18n.language;
return (
{t('hello')}
Current language: {currentLanguage}
);
}
export default MyComponent;
@@angtuananh5209 good job
Hello, how can I define the "t" inside an array of objects?
English or Spanish?
Por qué no los dos? 🧐
Thankssssssss Finally!
Si estoy haciendo mi portfolio, lo quiero hacer en Nextjs, tu crees que esto me sirva o habra mejores opciones?
te recomiendo usar Astro por el SSR
Thanks man
Wow
GRACIAS CRACK