S
S
Sergey Bard2018-05-24 09:04:32
Domain Name System
Sergey Bard, 2018-05-24 09:04:32

How to do localization on different domains?

Hello. there is a site for which you need to do localization, say Russian and English, the customer does not want to do it in the normal way, i.e. like this en.example.com (on a subdomain) and he wants different versions of languages ​​to be on different domains i.e. example.com and example.en i.e. as I understand it, the sites will look into one database, have the same structure, etc. just one will be in Russian, and the second in English, and the question itself is whether it is possible to somehow make the code for all sites the same, everything is the same only in different languages, and so that when someone makes edits on the site or finalizes something had to be written once, so to speak, so that I wouldn’t do something on .com and then run and do the same on .en ?, I know this is possible when they do it on virtual subdomains, but in this situation how do?, thank you)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2018-05-24
@serg_small_developer

You delegate the second domain to this site as well, as a result, two domains open the same site.
You write a class for checking a domain, translating static elements, translating components.
For components, duplicate the required fields with the suffix myvar_en, and it turns out that you either take the default variable if the Russian version, or add this _en to the field.
The implementation itself, in fact, is junk, there will be more routine for the translation itself.
PS There is no difference whether it is a subdomain or a separate one, they are both independent sites and do not change the essence

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question