Closed sasin91 closed 3 months ago
Noticed trongate-mx offers mx-build-modal html attr. Should i update the translate modal to leverage that, once it's released? 😊
Starting to get a bit complicated with the Drivers and i feel like Database is probably the better place to store the translations tbh. Got the JSON file idea from api.json & frontend frameworks. :)
I love what you've done! It's very easy for me to see that you're an outstanding developer and, quite frankly, you probably know more about this side of things than I do.
However, just to give you a heads up:
Localization (i.e., getting Trongate to work with multiple languages) is one of the absolute top priorities for the framework. This is something that I consider to be extremely important. I want it. We need it.
Between now and November, we're working flat out on improving the documentation and also rebuilding Trongate MX and Trongate Pages. This is a HUGE job and it's taking all of our attention. So, what I'm going to say is that I love what you're doing. However, I think you're a little bit too early to the party with this.
Let me assure you, we are going to be adding localization functionality into Trongate, but that won't be until the completion of the other things that we're doing. I predict that we'll be moving onto localization sometime between November and January. I know that's a long time, but we have to do this right. We are building tools that will hopefully last for decades.
When the time comes, I hope you'll be able to give us your input and help us to make Trongate a beautiful multilingual framework.
Hail Sasin91!
I had a feeling this would be the case. :)
I'm totally fine leaving this as a draft and later checking it out to see which ideas sticks and which to ditch :)
Provides translation support both in JS (tested in trongate_pages) & in PHP for templates. The current implementation stores the translations in a json file for each language, if desired i can implement support for multiple or a different storage, eg. DB.
modules/trongate_localization/assets/lang/en.json
in JS
in a PHP
I have also made a little groundwork to support currency and money formatting, but not quite sure how to implement on trongate-pages.
Currently if a locale is not provided it tries to infer it from the "ACCEPT-LANGUAGE" header, this can ofcourse be changed to support others, eg. ?language=da query string :)