cre8magic – Magic Languages
The languages need three things to work as expected:
- They need to know if they should show
- They need to know what languages to show and what labels to use
- They need to be styled
cre8magic makes this happen using these parts:
- The theme.json which has all the configurations
- The
themessection determines if the menu should show usingparts.languages - The
themessection also has alanguagesMinwhich would hide the languages if there are less than X languages (usually it needs at least 2) - The
languagessection has configurations for what languages to show and what labels to use - The
themeDesignssection determines how it should look - ATM there is only one keylanguages-lisince the rest has sufficient automatic class names to cover all known styling cases
- The
- The Magic Settings which will parse the json and provide the parts we need
- The base Razor
MagicLanguagesprepares everything so you can inherit from it and create the output as needed
How to Use
Best check the reference implementation on 2shine Template Theme
History
- All created in v0.0.1 2022-10