Skip to content

Michelalmeidasilva/RN-i18n-database

Repository files navigation

I18N + DATABASE + ASYNC FETCH LANGUAGES

Introduction

This repository demonstrates the implementation of internationalization (i18n) in a web application, where language data is fetched asynchronously from an API and stored in a database instead of using traditional language files. The goal is to showcase a more dynamic and scalable approach to managing language translations.

Key Features

  • Async Fetch Languages: The web application fetches language data asynchronously from a language API, enabling real-time updates and new language additions without modifying the application's source code.

  • Database Storage: Instead of using static language files, language data is stored in a database (e.g., MongoDB, MySQL, PostgreSQL), allowing easy management and manipulation of translations.

  • Localization Support: The application supports multiple languages and locales, making it more accessible and user-friendly for a global audience.

  • Dynamic Content Update: Users can switch between languages without the need to refresh the page, as the translations are dynamically updated through async API calls.

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/your_username/i18n-database-async-fetch.git
    cd i18n-database-async-fetch
    
  2. Install the required dependencies:

    npm install
    
  3. Set up the database connection in the configuration file (e.g., config.js), providing necessary details like host, port, username, and password.

  4. Set up the language API endpoint in the configuration file, specifying the URL to fetch language data.

  5. Create the necessary database tables or collections to store language data.

Usage

  1. Start the web application:

    npm start
    
  2. Access the application in your web browser at http://localhost:3000.

  3. Explore the application and switch between different languages using the language selector.

  4. Observe how the language data is fetched asynchronously from the language API and stored in the database.

Contributing

Contributions to this project are welcome. If you find any issues or have suggestions for improvements, feel free to create a pull request.

About

React-native app with local database to store i18n .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published