Table of Contents
The code defines a React component that displays a greeting and a message in the currently selected language. The available languages are English, French, and Spanish. The user can switch between languages by clicking the corresponding buttons. The IntlManager component (likely defined in the ./IntlManager file) is responsible for managing the language context and providing translations based on the current locale.
- Uses useState for state management.
- Employs react-intl for internationalization.
- Provides language switching functionality.
- Relies on the IntlManager component for translation handling.
- The IntlManager component handles translation logic based on the provided locale.
- The FormattedMessage component fetches translations from the IntlManager context.
- The translation files for English, French, and Spanish are available and correctly configured.
To get a local copy up and running follow these simple example steps.
- Check if Node.js is installed
node -v
If it is not installed, download and install it.
-
Clone the repo
git clone https://github.com/lalomax/internationalize.git
-
Open directory
cd internationalize
-
Install NPM packages
npm install
-
Run in development mode
npm run dev
- Add Changelog
- Multi-language Support
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Your Name - https://x.com/OrlandoFloresH - [email protected]
Project Link: https://github.com/lalomax/internationalize
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!