Somehow it is strange that this topic is devoted to so few articles. I must admit, I thought that there are many beautiful solutions, but Googled a bit and found only a set of plug-ins. And no theory. Fill this gap.
The implementation of multi-language (site in several languages) is completely dependent on the problem. In fact, there are two possible options: synchronous and asynchronous. In the synchronous case ( encountered not so much as people think ) all articles and items are the same site in different languages. Or everyday language: in whatever language you are not switched on the site, everything is the same, only in another language.
In the asynchronous version of the sites are not equivalent. It may be only one page in another language (. http://tochkaopory. ru /. -. http://tochkaopory. ru / indexen. php. ) And full- site (. http://centrodent. ru /. -. http://centrodent. ru / index. php? lang = en. ).
A typical way to implement a synchronous version - a doubling of the fields. T. e. for each language added to the field in another language. Usually, the name of the fields in the MySQL table prefix. The template and the widgets added processing of variable responsible for the current language - instead of NAME field is derived, for example, NAME {LANG}, where {LANG} can be equal to or _RUS _ENG depending on the selected language. The work is dreary and long, so usually have any studio already has developments on this case for the required modules in the content management system (CMS).
Once fully implemented, the user has a single entrance, but on every news / article / content item must fill out the fields and in another language.
Another way to implement the synchronous version is not synchronous. Nevertheless, it is often used as. Put two independent site with the same settings and fill in the different language. Typically, these sites are separated in different folders or sub-domains. Management often vyrozhadetsya asynchrony in two versions, after a while. Yes, and hosting requirements in such a case arises. Here is an example of such a site on the three bases MySQL:. http://villa-severin. ru /.
Asynchronous sites most often implemented as an example of the above. But there are two options for implementation. Single- unit content and linking to the language.
In the case of single-page one finds ( at least - a few ) content unit outside the main site template - removed or replaced by foreign-language counterparts all navigation links and graphics. Ironically, almost every CMS is actually. A unique link on this page is hung on the flag. Go to the full version of hung up on the other box.
Linking content items (articles, news, pictures, etc. n. ) To the language more complex and requires significant engine dopilivaniya. By the way, we did it one single time in their practice. The bottom line: the desired language is displayed only the content that is tied to a given language, and everything is stored in a single admin. In a sense, is the appearance of content in another dimension - the language. Typically, it costs only one CMS - bound to a section or module. Briefly go into technical details, then any unit of its content by adding a criterion Language. In the future, it determines which version of (language) to withdraw an article or news. As a result, sites in different languages grow independently, but the porridge in the catalog of articles / news in different languages still confused by inexperienced kontentschikov.
A few words about changing the design (and / or navigation) under the tongue. Empirically, we have long stood in the content files for each language. Then go to any other language does not require, for example, expanding the language tables in the database - just to transfer a text file with variables and to connect it by clicking on the flag. In the same file are written and the way to the graphics of the site (if there are items that are replaced ). This method is used not only for multilingual sites, but for one domain parked sites when multiple domains have to assign different templates.
In general, to create a multilingual site in perfect condition you can not do without dopilivaniya. Do you have a case of the simple site in different languages.
No comments:
Post a Comment