Whats the best way to have multilingual site/application?

Hi, i have a website(wordpress)+web application(PHP).

can somebody give me some suggestion whats the best way to make them both multilingual? i don’t want to use google translator API becoz that’s not 100% accurate. also i want a solution that will not change on page refresh.

another question, is it ok to have multiple SSL certificates from different CA for 1 site? i mean 1 certificate for site another certificate for a sub-domains.

thanks in advance

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

can somebody give me some suggestion whats the best way to make them both multilingual?

I can tell you from my experience that all wordpress language plugins are a “pain in the behind” and I’ve tried all of the popular ones.

The most famous one - WPML - is actually the worst of them all. I spend approx. 2 weeks with cutomer support, ending up with some custom made hacks (bad code) throughout wordpress (e.g. woocommerce, ticket-bookings etc.) which makes it also very difficult to update. In short: any minor update by some other plugin can bring your whole site down. Been there - done that. But to be fair - this was a complex website with lots of different modules.

Even worse is the huge decrease in site speed - and there’s nothing you can do about this except reading endless promises that “the next update” will improve things. You may notice - the word WPML alone - makes my blood boil :)

If you must use a plugin (e.g. your client constantly adds new content) then there have been some promising alternatives surfacing on wordpress official plugin site lately - my favourite being qTranslate X which you can find here . Do yourself a favour and read the plugins support forums before you install any of these.

Imho the most elegant way for “relatively” static business sites is to have a completely separate wp installation for each language. This will initially take more time to set up but in the long run will safe you lots of time and headaches and is also best performance wise.

Regarding your PHP-application: put a copy of your app in the same subdomain/subfolder as your translated wp installation and search & replace all terms that need translation throughout your code (except if there’s a .po-file included, then you don’t need that). If you are comfortable modifying your code you can also create your own .po file but to do that you must manually add a hook to each phrase that needs translation. There should be plenty of tutorials out there how to create your own .po file for your app.

i don’t want to use google translator API You are absolutely right about this. But I see that it’s quite popular among scammers who set up lots of meaningless keyword-targeted websites to lure in traffic for their add banners ;)

This comment has been deleted