How to translate Time4VPS WHMCS module?

  1. Knowledge Base
  2. Reseller Hosting
  3. How to translate Time4VPS WHMCS module?

Since Time4VPS WHMCS module does not include proper way to translate its language in order to do it we will have to use Javascript. Just place this javascript in page of a service and replace “Translate Goes Here” with a proper translations:

document.body.innerHTML = document.body.innerHTML.replace(/Install OS/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Are you sure you want to reinstall server/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Yes/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/No/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Continue/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Back to Server Management/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/will be erased/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/All data/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/WARNING/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Please select a new OS for/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Change Hostname/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Web Console/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Reboot/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Installation Results/g, 'Translate Goes Here');  
document.body.innerHTML = document.body.innerHTML.replace(/Detailed Info/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/sub.domain.tld/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Are you sure you want to reboot/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/Please enter a new hostname for/g, 'Translate Goes Here');
document.body.innerHTML = document.body.innerHTML.replace(/How long do you want to access console on/g, 'Translate Goes Here');

For this piece of Javascript thanks goes to our client Arta Seyzed.

Was this article helpful?

Related Articles