D
D
Denis Ilinykh2011-03-11 12:06:18
PHP
Denis Ilinykh, 2011-03-11 12:06:18

How to write websites for 2 or more languages?

We have to start writing a website. The interface will be both in English and in Russian. I would like to know how to competently implement the translation of the site (buttons, ruffles, menus, links, headings, tables, forms). So that would not fence on 2 or more sets of templates for each language.
For now, I'm leaning towards. Gettext module for Smarty
PHP language.
Maybe there are better options). Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Ogra, 2011-03-11
@Ogra

php.net/manual/en/function.ngettext.php

D
DorBer, 2011-03-11
@DorBer

I see your Smarty tag. How I did it:
- introduced a new tag {=Default language text}
- made a dictionary replacement - if there were untranslated
values, then simply removed {= and } . tag again. The last option will allow you to use special. tags are not only in templates, but the translation is applied at the output stage.

D
Denis Turenko, 2011-03-11
@Dennion

Link on the topic habrahabr.ru/qa/4243/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question