Home  >  Article  >  PHP Framework  >  How to switch between thinkphp5 multi-language

How to switch between thinkphp5 multi-language

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-23 09:57:273946browse

How to switch between thinkphp5 multi-language

#Steps to switch thinkphp5 to multiple languages:

The first step is to enable multi-language configuration in the configuration file.

How to switch between thinkphp5 multi-language

The second step is to create a multi-language directory.

How to switch between thinkphp5 multi-language

Related recommendations: "ThinkPHP Tutorial"

The third step is to write the language package.

How to switch between thinkphp5 multi-language

How to switch between thinkphp5 multi-language

View code:

How to switch between thinkphp5 multi-language

Controller code:

How to switch between thinkphp5 multi-language

The effect is as follows:

How to switch between thinkphp5 multi-language

The above is the detailed content of How to switch between thinkphp5 multi-language. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn