Answer the question
In order to leave comments, you need to log in
Implementing a settings system for a multilingual site?
The names of the options are in xml files, but the values of these options must be in the database. Now the settings system works fine on the site, but multilingualism has been introduced for it, so you need to take into account multilingualism and set up for the system. There are many nuances. For example, there is an option "option_api", which stores the key to the api of an external service, i.e. this key will be the same for each site language. There are options that can be set to "yes", "no", "not specified", i.e. it is either a radio button or a select - i.e. value can be used for all languages of the site. But there are options that store the name, for example, the name of the site section, i.e. they are a text field and will have different values for each language.
Now I store the options and their values in 2 tables: in the first option, in the second, all the options for the values \u200b\u200bof these options. Those. now you can return the old value of the option, or you can add a new one, etc. for example, an option can be an image, for example, a logo - a winter version of the logo, summer, so that you can switch depending on the season.
I do not give the structure of the tables so as not to impose my opinion. I'm using Zend Framework if that helps.
In general, please share your experience of implementing this on the site.
Answer the question
In order to leave comments, you need to log in
The names of the options are in xml files, but the values of these options must be in the database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question