i am trying to make my website support 2 languages that users can switch between them, i bought a theme that has a language directory with .po files such as en_US.po fr_FR.po and more. i copied the english file and translated it into Arabic, in order to apply the Arabic translation i have to rename the ar_EG.po to en_US.po which leaves me with 1 language option and i need to have both Arabic and English. Is there a way that i can make my website switch between 2 .PO files instead of 1 or can i make a new folder inside my word press installation with the same website but with the other language file working and both of the websites linked to the same database?
2 Answers
There are various plugins to manage multilanguage sites; I would personally recommend Polylang since it's free, very easy to use and makes a smart use of WordPress APIs so it's developer friendly, if you would need that. Also, every content gets its own URL, which it's good for SEO.
After installation, go into Settings → Languages to define the languages of your site. The plugin provides a widget that will enable your visitors to change the language of the site, as well as an special nav menu item.
You should keep the theme translation as ar_EG.po; the plugin and language switcher that comes with it will take care of loading the appropiate language file for the theme.

- 549
- 3
- 6
-
actually it changed my wordpress admin panel only but it didn't translate a single word inside the theme it self – Ahmed Seif El Din Nov 20 '14 at 23:25
-
Did you published some contents on both languages? When you view an english post (or page), you should see the site on english; when viewing a post in arabic you should see the site on arabic. – felipelavinz Nov 21 '14 at 01:12
-
i didn't translate anything except the admin panel, even the theme navigation menu and posts didn't get translated. – Ahmed Seif El Din Nov 21 '14 at 01:53
ya elipelavinz is right that plugins name is polylnag
if you want to tranlate your theme caption use codingstyleloalization
codingstylelocalization translate only __() caption or _e() function

- 46
- 4