Comments (5)
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:
- 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.
- when building an application, how can text be specified in multiple languages. This would be important for people building applications for multiple languages.
- 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.
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.
@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.
@glutamate About the mentioned points.
- 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.
- 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.
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)
- Feature Request: Multi-Line Text HOT 1
- FR: make it possible to customize the transitions between pages. HOT 1
- Error accessing tables: "Cannot read property 'role' of undefined" HOT 2
- !!! [saltcorn.com] Unstable login status HOT 7
- [wiki.saltcorn.com] No edit button for wiki pages
- QR code generator HOT 5
- Postgresql table provider and sync HOT 6
- How do I open saltcorn, if the page is insecure? And another question. HOT 3
- Feature Request: Add Field over PNG of document HOT 7
- Constraint Error Message HOT 1
- More advanced state control. (url state is not enough) HOT 8
- Login triggers don't work for me. HOT 5
- List view -> "layout option" bug HOT 1
- jsonWhere implemented incorrectly
- Cordova Builder Fails To Complete HOT 2
- Flash-cards module does not have a flip animation?
- [wiki.saltcorn.com] images aren't loading
- Support for touch devices in the visual editor (drag-and-drop).
- Works only with http and not https HOT 1
- Feed view improvement("underlying individual view" from formula)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from saltcorn.