Luccid-ai / react-planner

:pencil2: A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
https://cvdlab.github.io/react-planner
MIT License
15 stars 15 forks source link

[Feature] Add the possibility to extend the available translation externally #11

Open MeTaNoV opened 1 year ago

MeTaNoV commented 1 year ago

Rationale

Currently, we support 3 languages and define all available translations in the following folder:

src/
├── translator/
│   ├── en.js
│   └── it.js
│   └── ru.js

But we provide no document on how to integrate external translation.

Migration

Find out which record to extract from the current list, e.g. "Get Screenshot" is used by the external component

A default Translator is created in the ReactPlanner Component:

ReactPlanner.defaultProps = {
  translator: new Translator(),
  ...
};

And, it can be overload externally when creating the ReactPlanner component.

MeTaNoV commented 1 year ago

"Call Planfinder" is another example currently to be externalized because specific

Christelle-Couchoux commented 7 months ago

Not exactly this issue, but related. I have added French translation to my project. Is it something you would be interested in?