0

I want to translate a simple HTML site into two languages, I have always opted to duplicate the site and put each copy in a "language directory" as follows:

en/page.html
es/page.html

I feel the i18next library could be useful (for what I've read), but I would like to keep urls like in the previous case but with only one version of the file and I don't see a way to achieve this with such library.

Is this possible? Do I need to use node with express to achieve this? Or use a PHP solution?

Thanks for further answers.

Thanks

elabx
  • 31
  • 5

1 Answers1

0

I think PHP solution is much more better than Javascript. For PHP multilanguage support check gettext, Below are few links which help you to understand

http://www.gnu.org/software/gettext/

https://blog.udemy.com/php-gettext/

complete example of gettext in php

http://blog.lingohub.com/2013/07/php-internationalization-with-gettext-tutorial/

Google Search: (php gettext tutorial)

Wordpress also use gettext libraries and tools for i18n.

http://codex.wordpress.org/I18n_for_WordPress_Developers

Community
  • 1
  • 1
tzafar
  • 674
  • 3
  • 12