simplcommerce / SimplCommerce

A simple, cross platform, modulith ecommerce system built on .NET
http://www.simplcommerce.com
Apache License 2.0
4.19k stars 1.58k forks source link

Language Packs #594

Open hishamco opened 5 years ago

hishamco commented 5 years ago

SimplCommerce already has extensibility points in modules & themes, i'm thinking to add a language packs too

I will try later to write down some ideas of how we can implement this to play nicely with SimpleCommerce

hishamco commented 5 years ago
  1. Creating Language Packs folder in the host for the supported languages
  2. Each folder inside the Language Packs named with the language name: English, French, Arabic .. etc
  3. Add a manifest file for each language as the following:
    {
    "id": "SimplCommerce.LanguagePacks.English",
    "name": "English",
    "nativeName": "English",
    "culture": "en",
    "ISO": "ENG",
    "version": "1.0.0"
    }

    It could be culture specific

    {
    "id": "SimplCommerce.LanguagePacks.English.US",
    "name": "English - United States",
    "nativeName": "English",
    "culture": "en-US",
    "ISO": "ENU",
    "version": "1.0.0"
    }
  4. Add resource file per language, this could be a SQL script something similar to what we have now, or may be a code that run as a part of migration, so we can add or remove a language pack easily with its data
  5. The clean installation has no language packs
  6. Control the language packs from within the administration section
  7. Edit language resource from with the administration section (which we have it yet)

@thiennn if sound looks good, I will send a PR for it

hishamco commented 5 years ago

Of course this should play nicely with the supported cultures that we pick up from the database

thiennn commented 5 years ago

I think we should write a clear document on how to add new language first. I have write some lines here http://docs.simplcommerce.com/en/latest/how-to-add-new-languages/ it has not completed yet.

Add a UI to add a new language hasn't have much value at the moment because, It doesn't apply until the website restart

hishamco commented 5 years ago

IMHO we should take care about to make SimplCommerce ready for the RTM, revise & review the APIs to avoid any breaking changes later, after that we can work on docs extensively

Add a UI to add a new language hasn't have much value at the moment because, It doesn't apply until the website restart

I will struggle to avoid restarting the app, I promise if I did this many things will take the advantages