M
M
MdaUZH2016-01-08 11:51:01
PHP
MdaUZH, 2016-01-08 11:51:01

Multilingual, how to design correctly?

Hello, I read it, it means that there have already been questions here, and not a few, but still everything is somehow blurry there and each question is imprisoned for something specific, for example, a news site.
For me, everything seems to be clear, but there are small nuances that bother me.
The first question is how it will be more correct to enter the language, more correctly for SEO
How to enter the language, insert in a link like, http: // site. ru/ en /url is not very desirable.
do a subdomain: http:// en .site.ru/url is more preferable, but do not do the whole site on subdomains.
For example, take facebook, how is it determined which language to include?
Question twohow will it be more correct to set the meta tags and title of the page for each language?
I understand that it is better to store static content (button labels, etc.) in files (I store it in a JSON file) But each language needs its own page title and meta tags, now I
have a table for this in the database:
id | page | description | keywords | lang
language, I get the desired entry and insert it into the template, but this is an extra request to the database and I'm confused if this is necessary, maybe it can be somehow simpler and more adequate?
The third question is a compromise between page loading and generation
. How would it be more correct to do so that there is no heavy load?
I understand that it is more adequate to make 1 template for all languages, and fill in its static data (button names, etc.) from a file, JSON for example.
But again, the templates are large and you need to fill in a lot of things, how to implement all this more correctly?
So that the loads are not large ...
Thank you very much to everyone who answers :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mykola, 2016-01-08
@MdaUZH

1. http:// site. ru/en/url
2. It is necessary to remake the database structure. (It depends on what framework you are using) Like this: book.cakephp.org/3.0/en/orm/behaviors/translate.ht...
3. Cache.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question