Static and dynamic hybrid web project multi-language framework
This project is suitable for pure native web projects, and the backend is php.
- Please make sure you have a PHP environment
- Add the data-mess attribute to HTML tags that require multiple languages
- Name the tag in the data-mess attribute
- Create the language content corresponding to the tag in the JSON file
- For dynamic content, please ensure that the final output content of PHP is text attribute
- Download the code of this project
- index.php is the entry point of the project
- Activate the function by selecting the language button after running (note that the default language is English
- It is recommended that the language files should be kept consistent regardless of the language.
- Don't use long names in data-mess