【 demand 】 Internationalization I18N Language switching function , For example, menu list 、 Dictionary, etc .
It is mainly an auxiliary table to configure the management language :
A single field is simple , Data labels configured directly through the dictionary (key)- Table name , Data key value (value)- Table field name 【 The default number one is ID, Comma separated 】 The value of is used as a parameter to query , Get the data and fill in multilingual , Then save the three fields in the table ok 了 ,I18N The language configuration is json Field .
This is roughly the idea , The current problems are as follows
【 problem 】
Suppose there are multiple fields in a table that need I18N, that locale There will be multiple fields to be translated in , So how does the front end display , Of course, it can also not be displayed , After all, json Zhongcun i18n,
But you have to look at which field to configure multilingualism, right , So you still have to configure multiple field displays . How to solve the problem , At present, there is an idea , It is to combine multiple fields into one field , Then the front end is cut and displayed .
【 solve 】 adopt concat() The function concatenates multiple strings into a single string .
A solution .
mysql More related articles about merging two fields into one field query
- MySQL The method of merging multiple fields into one record
turn :http://www.111cn.net/database/mysql/71591.htm MySQL The method of merging multiple fields into one record stay mysql Many functions can be used to merge fields in , If you can use GR ...
- sql server How to merge two field data into one field display ( Add special symbols to fields )
Before , I'm doing statistics , A field is needed to display the order quantity and order amount of a month , It is required to combine into one field , Use parentheses . The statistical result is probably like this , First, let's create some simulation data --- Create order form --- create tab ...
- python Code for two methods of combining two arrays into one
In the process of content , Collect the common contents in the process of writing , The following information is about python The contents of two methods of combining two arrays into one array , I hope it can help my friends . c1 = ["Red","G ...
- Oracle How to merge multiple fields into one field
Let's record it today oracle How to merge multiple fields into one field , Use symbols “||” 1. Combined query data 1) Query statements before combination -- Fields of data before combination -- select A.MID CATE_ID,A.Co ...
- sql How to splice several fields into one field when querying a statement
sql How to splice several fields into one field when querying a statement SELECT CAST(COLUMN1 AS VARCHAR(10)) + '-' + CAST(COLUMN2 AS VARCHAR(10) ...) a ...
- MySQL The database combines a single field of multiple records into one record
primary SQL AND acc.id = accRole.acc_id) AND accRole.role_id = T_PM_ROLE.id ORDER BY acc.id result , One person has two roles , If ...
- mysql The queried column is merged into a field
Query all users and roles , A user will have multiple roles select u.*,sr.* from users u left join sys_user_role sur on sur.userCode=u.id l ...
- Use SQL Statement merges two tables in the database into one table
select * into The new name of the table from (select * from T1 union all select * from T2) This statement can add the merged data to a new table . Do not merge duplicates ...
- oracle,sqlserver Two fields in the same table and a column query ( Please add qq:2085920154)
sql Open two fields in the same table to compose one field for example SQL tab Field 1 Field 2 Field 3 3 4 No synthesis tab Field 1 Field 2 3-4 No SQL SERVER select Field 1 + ...
- sqlserver Take two. sql The two tables found by the query statement are combined into one table
first sql sentence select companyname gsmc,zb zhibiao from t_gsndzb left join t_companycode on t_gsndzb.gsbh=t ...
Random recommendation
- Python or JavaScript Achieve multi-level comments
Python or JavaScript Achieve multi-level comments Python Realization Js Realization
- VS2010 LINK1123:failure during conversion to COFF:file invalid or corrupt
Use today Visual Studio 2010 Compile one C I suddenly encountered the following compilation error while working on the project .fatal error LINK1123:failure during conversion to COFF:fil ...
- easyui-combobox The problem of the value of
Example :<select id="cc" class="easyui-combobox" name="cc" style="wi ...
- How to migrate from VMware and Hyper-V to OpenStack
Introduction I migrated >120 VMware virtual machines (Linux and Windows) from VMware ESXi to Open ...
- Jmeter Use notes html Report extension ( One )
. : In use loadrunner You can generate a HTML The report of , And it contains various charts , Various detailed data . But in the use of Jmeter After testing, it cannot be generated directly Html The report of ( Whether it's for use GUI Or fate ...
- char* and wchar_t* How to convert each other
char* and wchar_t* How to convert each other C Function can be used wcstombs - Convert wide characters to multi characters WCHAR -> CHAR mbstowcs - Convert multi character to wide character C ...
- Anaconda Download address
Anaconda installer archive: Address 1: https://repo.continuum.io/archive/ Address 2:https://mirrors.tuna.tsinghua. ...
- 10-vue Introduction to
vue You Yuxi is the author of , Chinese . People who think they're awesome , And my God of worship . About his own understanding , I hope you can read this article about him , Maybe you'll be interested in language , technology , Have a strong interest in .https://mp.weixin.qq. ...
- java Use google Open source tools to achieve image compression
Preface As reliable java Server Programmer , Pictures have always been a headache . Now many websites , All have the function of uploading pictures , And pictures for many mobile phones nowadays , All the pictures taken are high-definition pictures , The resolution is also quite high , Of course, the occupied storage is empty ...
- Learn practical interview techniques for written tests :linux
1.F:\Movies\ Shangxuetang big data weekend class ( Chuanzhi big data phase 3 ): The course is messy , Learn it all in order 1.linux Basics : I didn't know linux Is waste . Be sure to install a virtual machine .2018-05-27 Open up . The server can only install ...