I18n Internalization in react for english and hindi - reactjs

I am building a single page application using React. I want my website to be available in both the hindi and english language. So, for that I think I have to use react-intl. Okay but how can I make this work? I read a few tutorial but I did not find any good solution for Hindi. Please help me in my research on how to use i18n for English to Hindi.

It seems that Hindi language uses Devanagari script which is written from left to right (LTR), so translating your site to Hindi isn't different from translating it to any other language (e.g. Frech, Spanish, Czech).
All you need to do is add react-intl components to your code, create a message catalog with messages, translate it into Hindi and load it into your app.
If you have a more specific problem, please update your question or post another one.
Also, I'm an author of lingui i18n library which you might consider if you're at the beginning of your project. It's successor to react-intl and very similar in usage. There's a tutorial, but I could help you with any problems you might have with a Hindi.

Related

How to make React app that support multilanguage?

I have reacted app and there are many components, and I want that the text will support multiple languages,
I mean if the user wants English then all content of the component translates into English.
I try to add multilanguage in my react app using the i18next library but I found that I need to write all text in every language and store somewhere then use that.
But I want it when the user selects language and then it translates into the desired language without hard code.
like when we write anything in google translator then it translates all the page with the desired language.
If you want the content of your site to be machine translated on the go, then some browsers (if not all of them) have this built-in functions. Just right click and "translate" the page. So maybe you should just mention about this function somewhere on the page?)
But if you want the content of your site to be professionally translated, then you've got to store it in the db. And depending on the global language state (which could be managed with redux), the content in selected language will be rendered.
Live translation on your website is not a good idea.
Alternatively, checkout translate.i18next.com
like google translate but for i18next.

Which one should be used in React, l10n or i18n?

I have a webpage in React and I wanted to use l10n (localization) but only find information about i18n (internationalization), so I don't know if l10n exists for React or if I'm forced to use i18n.
l10n stands for localization and i18n stands for internationalization.
Localization is the process of guaranteeing your resources are focused on the requirements of one specific audience.
The use of it is about adapting your entire content so that it meets the norms and expectations of a specific location or market.
To know more about localization, have a look at this blog post.
The internationalization process covers the design and development. So basically it is the task of instrumentalization (adaption) of your software code to be ready to be localized (not only translated) for other languages, regions and cultures. Think about ltr or rtl, currencies, date formats, etc...
Usually an i18n framework is used to help with this tasks.
Since you're talking about React.js, you may have a look at this step by step guide for react-i18next.
To know more about internationalization, have a look at this blog post.
There is also globalization, for that have a look at this.
So tldr; There's a lot to think about when internationalizing a webpage.
More information can be found here:
What is Software Localization
Is your software ready for localization?
How to localize your website

How to internationalize ReactJS Web Application including Arabic language?

Looking for something compatible with ReactJS to make my Web Application multilingual along with RTL to LTR and vice-versa.
As per my research, I found NPM package called "react-intl" backed by Yahoo using FormatJS is relevant solution.
https://www.npmjs.com/package/react-intl
Is that reliable to use for Arabic language as well?
Do you know any other stable and scalable solution?
Yes, That's perfect you can use https://www.npmjs.com/package/react-intl
for Internationalization in React.
Also I did using above npm in Arabic, Hindi, Spanish.
Go through this link(https://medium.freecodecamp.org/internationalization-in-react-7264738274a0) which is helpful.
I use react.i18next specially when i'm using react hooks
here's a good step by step guid docs

What is a simple ReactJS Internationalisation library?

What is a simple library for making a react app support multiple languages, I have looked at https://github.com/yahoo/react-intl and http://airbnb.io/polyglot.js/
I am currently building a ReactJS app that has to support both English and German, something that has features like languages packs that for example will contain all the days, months in German, I should not have to provide that.
Thanks in advance.
Note: I have actually done a ton of Googling.

how to add multiple languages to an English website

I am trying to add two additional languages to my website - Chinese, Japanese. User inputs could be in native language, in English or be mixed. E.g. search by product name. Likewise output can be all-English or be in mixed languages, depending on a user's preferences. I already have applicable translations so that is not a problem. It is a data intensive site. It uses web APIs to fetch JSON data objects, and uses angular and backbone, and jquery.
I will appreciate if you possibly refer me to some good books or pages that provide guidance for building multilingual sites. Are there any particular web standards that must be followed by websites and by browsers?
Googling yields a ton of links, but the discussion appears centered around specific packages such as wordpress, joomla, .net, drupal, etc. and appears more around automated translations. It still left me confused about the basics requirements of multilingual sites as I do not use any of these packages.
Thanks a lot.
ps: if you need to leave me a -1, np. But I would very much appreciate a comment as to why - so that it doesn't appear as if you just vented and offered me no opportunity for improvement.
Wells... when i need to build a bilingual website i just use a language selector menu and build the whole website in 2 languages (i think this way its more professional) cause usually translators doesnt 100% translate correctly and at the end you just get a bunch of stuff making no sense.
Maybe you could use Google Website Translator gadget for what you trying to do?? its paid service tho, you could use also the plugin for Wordpress http://wordpress.org/plugins/google-language-translator/
Or use the Google Ajax Language API https://code.google.com/p/jquery-translate/

Resources