Giter Site home page Giter Site logo

Comments (3)

Chleba avatar Chleba commented on June 17, 2024

Some points of interest about a multi-languages solution:

  • hold language option in cookie or LocalStorage
  • switch language with URL (anchor or part of URL (/{lang}/page)
  • check default URL when language is not part of URL in 404-page view with the script that will get default language from LocalStorage or cookies then redirect to the right page
  • static text will be stored in JSON files in a key-value storage object
  • dynamic text from Kontent

from sample-app-react.

IvanKiral avatar IvanKiral commented on June 17, 2024

Spike Result

The are created two versions for the spike project which uses two different libraries:
react-intl: https://github.com/IvanKiral/routing-react
react-i18n: https://github.com/IvanKiral/routing-react/tree/react-i18-next

We have decided to go with react-intl due to used workaround in react-i18n in multilangue routing.
The json files will have the flat format - means no nested objects (only key:value).
To use custom datetime formatting: https://formatjs.io/docs/react-intl/components/#formatteddateparts
It has the BSD-3-clause project must include:

  • The full text of the license
  • The original copyright notice

from sample-app-react.

Simply007 avatar Simply007 commented on June 17, 2024

Looks good!

We need to think about a full copy of the license in #206

from sample-app-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.