Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

feature(lang): Implement our own i18n system #55

Open
tougrel opened this issue Jul 25, 2023 · 0 comments
Open

feature(lang): Implement our own i18n system #55

tougrel opened this issue Jul 25, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@tougrel
Copy link
Owner

tougrel commented Jul 25, 2023

The way I'm thinking it is having a JSON file like this:

{
    "en-us": {
        "title": "Pestoverse",
        "nav.menu": "Menu",
        "nav.theme": "Theme"
    }
}

This should be easy enough to load into a Map and use it on the code like lang.get("title"); to get the result we want. It should also make the switch between languages easy and fast because we will be loading all strings at once instead of having to reload the page.

If anyone thinks that this will slow down the website loading then we can go with the second option of requesting the strings and adding them on the map via an API and only load the selected language by default! 👍

@tougrel tougrel added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 25, 2023
@tougrel tougrel self-assigned this Jul 25, 2023
@tougrel tougrel pinned this issue Jul 26, 2023
@tougrel tougrel linked a pull request Aug 23, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant