-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Epic]: Where does the user change the language? #2597
Comments
To change the language in the application, follow these steps:
import React from 'react';
import { useLanguageHook, languages } from './path/to/useLanguageHook';
const LanguageSwitcher = () => {
const { change, currentLanguage } = useLanguageHook();
const handleLanguageChange = (newLanguageShortName) => {
const newLanguage = languages.find(lang => lang.shortName === newLanguageShortName);
if (newLanguage) {
change(newLanguage);
}
};
return (
<div>
<p>Current Language: {currentLanguage?.label}</p>
<button onClick={() => handleLanguageChange('es')}>Switch to Español</button>
{/* Add more buttons for other languages as needed */}
</div>
);
};
export default LanguageSwitcher; This component allows users to switch languages, automatically updating the UI and saving the preference for future sessions. Ensure you have the
|
@dosu no I mean when im on the website, the website is already running. but how do I change the language from English to Spanish? |
To change the language from English to Spanish on the website, you can interact with a language switcher component if it's available. This component should be visible on the website, often found in the header, footer, or settings menu. Look for an icon representing a globe, flags, or simply a dropdown menu labeled with the current language or "Language." Here's a quick guide on how to use such a component:
If the website uses a In case you can't find a language switcher on the website, it's possible that the feature might not be implemented or is not easily visible. In such scenarios, reaching out to the website's support or feedback channel might be helpful to request this feature or get assistance on how to access it.
|
Why do we need this functionality?
Hello, I am not able to change the language from English to another language. I need help.
What are we developing?
What are the validation criteria to validate this feature?
What's out of scope for this feature?
Should this feature be feature flagged?
How are we going to code this feature?
Are there any technical decisions made that should be shared?
What is preventing us from delivering this feature?
What can the feature potentially break?
The text was updated successfully, but these errors were encountered: