Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi language in react #3082

Closed
wants to merge 17 commits into from
Closed

Conversation

lxzhangchao
Copy link

No description provided.

@xrmx
Copy link
Contributor

xrmx commented Jul 5, 2017

I think we need to use some tools that would get the annotated strings automatically. This is too error prone.

@lxzhangchao
Copy link
Author

Is it possible to use React-intl to implement multiple languages?

@mistercrunch
Copy link
Member

For internationalization of the frontend, I'd like to impose some constraints that aren't respected here:

  • single place for backend / frontend translations (we use Python's Babel in the backend)
  • should be integrated with webpack somehow so that there's different entry points built for each language somehow so that the javascript would be minified properly with only what you need as opposed to downloading all languages

@lxzhangchao
Copy link
Author

lxzhangchao commented Jul 14, 2017

To share the translation files of Python and the translation files of JS.
I looked at some information and did some experiments with API. I got some results
I translate the python translation to JS translation by calling the function method

  1. the translation of the string is implemented in the form of reference, but to translate multiple pages, you need to send multiple requests that slow down the load. This method is not available
  2. I tried another method, through the function call the translation of files, disposable loading to translate the language files, but the string type to call them the result of API that is not what we want to use the translation, the conversion process is not achieved.
    3., I have found through other tools, such as react-intl, react-intl-universal, that internationalization functions or new language configuration files, translation files can't be unified.

I wonder if you have any new ideas to implement common translation files to achieve universal internationalization of Python and JS
@mistercrunch

@xrmx
Copy link
Contributor

xrmx commented Jul 14, 2017

@lxzhangchao seen this? #1926 (comment)

@xrmx
Copy link
Contributor

xrmx commented Jul 19, 2017

@lxzhangchao if you have opened a new PR please close this one.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d06df15 on lxzhangchao:ch_react_page into ** on apache:master**.

2 similar comments
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d06df15 on lxzhangchao:ch_react_page into ** on apache:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d06df15 on lxzhangchao:ch_react_page into ** on apache:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d06df15 on lxzhangchao:ch_react_page into ** on apache:master**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants