Answer the question
In order to leave comments, you need to log in
How to localize a site for a couple of languages?
Hello.
I have never localized sites before, but now there is such a need.
I think to insert a php function together with the text, which returns the text in the desired language from the array, given the global variable. Is this the right approach? Are there better (native) options? What should be considered when initializing a project? Goal: php practice, because. Prior to that, I only did front-end.
Thank you!
Answer the question
In order to leave comments, you need to log in
Add prefix /:lang to the URL
It will be:
/ru/content
/en/content
And already in PHP you process it depending on the parameter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question