A successful attempt on adding switch language option in the angular app and integrating it with crowdin.com

in #utopian-io6 years ago (edited)

start_angular.png

A successful attempt on adding switch language option in the angular app and integrating it with crowdin.com

Warning

Many pull requests resulted from changing places and names of translation files in order to add the switch language option and integrate it with crowdin.com.

Adding the switch language option

Task:
134
Pull request:
141

Integration with https://crowdin.com/project/user-management-ui

Task:
149
Pull request:
165

Translation into the Polish language

I added the Polish translation in order to check if the switch language option works.
Pull request:
167

Adding the switch language option in the angular app

I added the switch language option to create
additional dedicated um-translate module, which uses ngx-translation module.

Screenshot from 2018-02-27 11-35-54.png

Screenshot from 2018-02-27 11-35-54_1.png

In order to add translation service to modules (sid, shared, security), I added the UmTranslateService service.

Screenshot from 2018-02-27 11-37-32_1.png

In order to avoid errors, I added all the necessary translation files. For now, except the Polish language version, they all contain the English language version.

Screenshot from 2018-02-27 11-46-18_1.png

Next, I injected UmTranslationService into every module and used it in the html template.

Screenshot from 2018-02-27 11-44-12_1.png

Integrating crowdin.com with github.

Screenshot from 2018-02-27 11-48-29_1.png

An important element of the integration is the addition of a source file with translations,
eg. to_translate.json.

Screenshot from 2018-02-27 11-53-05_1.png

Screenshot from 2018-02-27 19-27-20_1.png

Summary.

Although initially I did not know the crowidin.com system and had to experiment with configuration, I managed to switch languages and integrate the translation files with crowdin.com.

I would like to thank crowdin.com for their generous help and free support for the open-source project under the GPL license.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @grzesiekb I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x