jan-vandenberg / cruddiy

No-code Bootstrap PHP CRUD generator
http://cruddiy.com
GNU Affero General Public License v3.0
253 stars 80 forks source link

UI/localization #82

Closed germain-italic closed 1 year ago

germain-italic commented 1 year ago

This PR depends on (at least) #72 and #74.

(and probably #73 and #80 although it's hard to test) (This PR might be conflict-prone, thought.)

Introducing localization for the generated pages!

All texts are sent to the translate() functions in helpers.php, the key is the fallback if a translation is missing. Texts in English are (mostly) identical, French is native by me, NL / ES / DE / IT / PT / CZ / CN / JP / IN / RU by Deepl.

The polyglot UI:

Feel free to contribute and polish the translations (pun intended).

This is how an admin picks the language:

We can also edit config.php and change language later. Maybe we could add a language picker in the navbar.

germain-italic commented 1 year ago

ping @jan-vandenberg in case you didn't receive the notification

jan-vandenberg commented 1 year ago

Wow this is an interesting change!

There are a few conflict though.

germain-italic commented 1 year ago

Damn conflict. It's usually a good practice to start from master or from the previous depending branch, I don't know why there are so many conflicts on my PRs.

Hoepfully as the code gets more readable (especially from separating PHP/HTML and removing "echo ") it'll go better.