Home Backend Development PHP Tutorial Thinkphp语言文件引不进来的有关问题

Thinkphp语言文件引不进来的有关问题

Jun 13, 2016 pm 01:29 PM
lang quot var

Thinkphp语言文件引不进来的问题
比如模板文件中有一个词是“注册”,我在LANG-》zh-cn-》common.php>中定义
return array(
  'register'=>"注册",
)
然后把模板中的“注册”二字 修改为 {:L(register)} 为什么显示 REGISETTER,而不显示“注册”二字呢?
我在config文件中 定义了 'DEFAULT_LANG' => 'zh-cn'

------解决方案--------------------
开发手册云 如果要在模板中输出语言变量不需要在Action中赋值,可以直接使用模板引擎特殊标签来直接输出语言定义的值:
{$Think.lang.lang_var}
可以输出当前选择的语言包里面定义的 lang_var 语言定义

Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

The role and examples of var keyword in PHP The role and examples of var keyword in PHP Jun 28, 2023 pm 08:58 PM

The role and examples of var keyword in PHP In PHP, the var keyword is used to declare a variable. In previous PHP versions, using the var keyword was the idiomatic way to declare member variables, but its use is no longer recommended. However, in some cases, the var keyword is still used. The var keyword is mainly used to declare a local variable, and the variable will automatically be marked as local scope. This means that the variable is only visible within the current block of code and cannot be accessed in other functions or blocks of code. Use var

18 Ways to Fix Audio Service Not Responding Issue on Windows 11 18 Ways to Fix Audio Service Not Responding Issue on Windows 11 Jun 05, 2023 pm 10:23 PM

Audio output and input require specific drivers and services to work as expected on Windows 11. These sometimes end up running into errors in the background, causing audio issues like no audio output, missing audio devices, distorted audio, etc. How to Fix Audio Service Not Responding on Windows 11 We recommend you to start with the fixes mentioned below and work your way through the list until you manage to resolve your issue. The audio service may become unresponsive for a number of reasons on Windows 11. This list will help you verify and fix most issues that prevent audio services from responding on Windows 11. Please follow the relevant sections below to help you through the process. Method 1: Restart the audio service. You may encounter

Let's talk about the differences between var, let and const (code example) Let's talk about the differences between var, let and const (code example) Jan 06, 2023 pm 04:25 PM

This article brings you relevant knowledge about JavaScript. It mainly introduces the differences between var, let and const, as well as the relationship between ECMAScript and JavaScript. Interested friends can take a look at it. I hope Helpful to everyone.

Solution to the error AttributeError(\'{0!r} object has no attribute {1!r}\'.format(type(self).__name__, k)) Solution to the error AttributeError(\'{0!r} object has no attribute {1!r}\'.format(type(self).__name__, k)) Feb 29, 2024 pm 06:40 PM

The reason for the error message indicates that in the python code, an object (represented by the self variable) is used, but the object does not have an attribute named k. This may be because the object does not have this property defined, or a type error in the code causes the object to not be of the expected type. How to Fix To resolve this error, you may need to do one or more of the following: Check your code for the error and make sure the object referenced by the self variable has a property named k. Check your code for type errors and make sure the object referenced by the self variable is of the expected type. If the attribute is missing, you need to define this attribute in the class and use tryexcept to get this error. If you are sure that k is an attribute that is not defined in the class, please confirm

What does let var const mean? What does let var const mean? Nov 14, 2023 pm 03:00 PM

llet, var, and const represent block scope variables, function scope variables, and constants respectively. Detailed introduction: 1. let, used to declare a variable in a block scope. A variable declared using let cannot be accessed before it is declared. This is the so-called temporary dead zone; 2. var, used to declare the key to a variable. Word, the declared variable is in function scope or global scope and is not restricted by block-level scope; 3. const, used to declare a constant. Once assigned, the variable cannot be reassigned. The value is after declaration. Cannot be modified etc.

Exploration of HTML5 global attributes: interpretation of five essential attributes Exploration of HTML5 global attributes: interpretation of five essential attributes Feb 25, 2024 pm 06:27 PM

HTML5 is a modern web standard that introduces many new features and functions to improve web interactivity and user experience. There are many global attributes in HTML5 that can be applied to all HTML elements and have a wide range of applications. This article will explore five key HTML5 global properties that must be understood during development. class attribute: The class attribute is used to specify the class name of one or more elements. The class name is a reference to the style rule defined in the CSS style sheet, passed by class

Distinguish the different characteristics of var, let and const Distinguish the different characteristics of var, let and const Feb 19, 2024 pm 05:24 PM

To understand the different characteristics of var, let, and const, you need specific code examples. In JavaScript, there are many ways to declare variables, the most common of which include using the var, let, and const keywords. Although they are both used to declare variables, they have different characteristics regarding scope and mutability. The differences between them are explained below with specific code examples. var keyword Let’s first look at the usage of var keyword. It is the earliest introduced way to declare variables, with global scope and

See all articles