How to translate a website?

Back in the day when I first started I duplicated the website and changed the language manually to have different languages…

Now that I have a new project that has 2 languages…I wanna ask…how do you translate a custom coded website? JavaScript, php, APIs??

Of course I do not want to use Google Translate since machine translation is not always correct plus I know both languages.

Please advise,

Thank you

Is the question how to GENERATE the translation, or how to INCORPORATE the translation?

I’m probably gonna get yelled at for it, but I am lazy and use something like a jquery i18n when i need to provide translations.

2 Likes

In PHP

  1. Current user locale. By default get it from $_SERVER[‘HTTP_ACCEPT_LANGUAGE’], than save in cookie.

  2. i18n sources. Could be a lot of variants (JSON, PHP array, XML .tmx…) I would like to use .csv.

  3. Specific class Translator. Translate some text from project locale (e.g. en_US) to current user locale.

Seems good enough.

Plenty of Jquery translator plugins available online. JtextTranslate, Jquery google translate plugin, Jquery.tr, Ajax Translator Revolution Lite Jquery Plugin, Lingua Localization Plugin and many more

1 Like

And do these plugins work with custom coded websites, @assist1?

1 Like

For custom coded site

For WordPress

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.