Git Product home page Git Product logo

Comments (5)

glutamate avatar glutamate commented on June 10, 2024

Thank you for raising this, it is a really important point. Right now, there is nothing related to translation. I think there are 3 different questions:

  1. how can we provide translations for the strings hardcoded in the Saltcorn codebase. This would allow you to build an application in a single non-English environment.
  2. when building an application, how can text be specified in multiple languages. This would be important for people building applications for multiple languages.
  3. how can user generated content be translated into multiple different languages.

I think 3 is just too difficult right now. Let's ignore this until 1+2 are solved

I will look into how I can do 1 first. This will probably lose points of the direction towards a solution for 2.

from saltcorn.

glutamate avatar glutamate commented on June 10, 2024

I've done the basic translation using node-i18n. It was very straightforward. The translation files are created with Google translate, so I expect many of the translations to be wrong or downright ridiculous.

This is done for the following locales: "en", "fr", "de", "da", "es", "no", "sv", "ru", "nl", "pt" - translation files are in this directory: https://github.com/saltcorn/saltcorn/tree/master/packages/server/locales it should be very easy to edit them. I can also really easily add more languages.

I have deployed on saltcorn.com, please test. In order to get it in your favourite language, you will need to tell your browser what your language preference is. I expect some failures and will be watching the crash log.

That basically concludes point 1 from my above comment. I think I have an idea about how to do point 2, but that is more difficult both in the UI and in choosing the appropriate language on the backend. For the hardcoded strings it was really easy, it's all done for you as if by magic but that won't work as easily for point 2.

from saltcorn.

AleksandrSokolov avatar AleksandrSokolov commented on June 10, 2024

@glutamate I just added basic description of translation to wiki: https://wiki.saltcorn.com/view/ShowPage?id=31

Because i was done it using smartphone it is not very nice.
Please put the link to this page from main pages.

from saltcorn.

AleksandrSokolov avatar AleksandrSokolov commented on June 10, 2024

@glutamate About the mentioned points.

  1. Thanks. You are very rapid in adding new features.

May be the long string keys is not very cool solution but for the moment it works fine.

  1. There are no easy answer to do this. May be wiki application is good start point to experiment with this. Because wiki usually can have few different language variations of same page.

About technical realization. Few options.
Needs protyping or find great solution in other projects.

from saltcorn.

igorkb avatar igorkb commented on June 10, 2024

The translation files are created with Google translate, so I expect many of the translations to be wrong or downright ridiculous.

Oh god it is horrible! hahaha

In order to get it in your favourite language, you will need to tell your browser what your language preference is.

It's strange how the website selects the language without letting me choose.

I was busy for the last 2 days, but i will take a look tonight (GMT -3) and try to translate some things.

I am a industrial designer (who also runs a bakery) and i know little to nothing of JS (I mainly use Python and a bit of Lua), but i can work on the translations to Brazilian Portuguese, Italian, French and a bit of Spanish.

from saltcorn.

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.