# SevensMultiLang-Plugin **Repository Path**: hoseapps/SevensMultiLang-Plugin ## Basic Information - **Project Name**: SevensMultiLang-Plugin - **Description**: A MultiLang plugin for most of the PHP CMS. 一个快速让你的PHP项目拥有多语言功能的插件。 - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2016-12-13 - **Last Updated**: 2024-03-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SevensMultiLang-Plugin >In order to implement the multi-language feature in a exist system,we always have to rebuild the system and do a lot of job. To solve this problem, I have extracted a multi-language plugin from one of my project. You can implement multi-language feature easily. [中文文档](/docs/zh/README.md) # Installation 1.Download the **SevensMultiLang** folder and put it to the root directory of your project(Note the access path settings). 2.Setting up plugin in the entry file of project, take [OneThink CMS](http://www.onethink.cn/) as example: ```PHP /** * [Here you need to add the code] * Require the Mult-Lang core file before require entry file. */ require './SevensMultiLang/MultiLang.php'; /** * 引入核心入口 * ThinkPHP亦可移动到WEB以外的目录 */ require './ThinkPHP/ThinkPHP.php'; ``` # Set up the default Language ```PHP $config['lang'] = 'zh-tw'; return $config; ``` Modify the config/config.php file and change the value of **lang**. Noted that this value must correspond to the name of the folder of the **lang** folder. # Fill up language file The language files stay in the **lang** folder. # How to use After above configuration, you need to modify the view files for trigger the multi-language plugin. ```HTML

``` This is one of my file. I have set the slogen value in lang file before. And Then I use the ```mlang()``` function for getting the true value. # Change Language **SevensMultiLang-Plugn** provides a function call ```changeMlang``` function for changing the current language. # License `SevensMultiLang-Plugn` is licensed under [The MIT License (MIT)](LICENSE).