• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

how to use PLESK language packs

S

spandauforum

Guest
hi guys how can i set plesk7.51 to use a language pack?

i need to convert my whole site into spanish language, is this

possible thanks for the time :p
 
You will need to purchase a language pack addon ($99 :( ) Then download the spanish pack and execute it on your server then it will be available in the drop down.

-poke
 
Originally posted by poke
You will need to purchase a language pack addon ($99 :( ) Then download the spanish pack and execute it on your server then it will be available in the drop down.

-poke

if i purchase a language pack addon, will it automatically convert all my strings (dynamic, static) from my site?
is it possible:
say using a link page from the english version that says...
click here to convert the site to spanish...

(converting the whole thing.. not just the static pages.)

thanks for your time dude.:D
 
Originally posted by poke
Yes everything in plesk ;)

wow thanks poke,

can i get back to you when i purchased the language pack addon? so that i can set it up and have my whole website the option of translating into a spanish-languge site??


thank you so much for the help i really appreciate it :p
 
The language packs only change the Plesk Control Panel Interface text.

How would a language pack file (it's not a script/application) go through and change all of a website's text (html, php, etc)??

I think maybe poke did not understand your question, or maybe I didn't. I believe you were asking if it would go through and change all of your domain's site files text to spanish. It won't. It only changes the Plesk Control Panel text.
 
Originally posted by jamesyeeoc
The language packs only change the Plesk Control Panel Interface text.

How would a language pack file (it's not a script/application) go through and change all of a website's text (html, php, etc)??

I think maybe poke did not understand your question, or maybe I didn't. I believe you were asking if it would go through and change all of your domain's site files text to spanish. It won't. It only changes the Plesk Control Panel text.

oh shoot....:(

yes you're right i have the site running on PHP scripts...

is there any way i can do to accomplish this goal?

any suggestions will be far more than welcome...
 
is there any way i can do to accomplish this goal?
You may not like this simple answer, but the simplest and cheapest way would be to have both and english and spanish datafile from which you pull the words/sentences into an array. (same as the control panel does)

You default to one language (English), have a click button on the page to change your PHP variable to 'spanish', it then reads the spanish text from the datafile and rewrites the page.

You can either put it in a separate datafile (IMO a cleaner way), or actually embed the text in your php code (no, no, no). It is cleaner to put all the text in a separate datafile, that way its all in one place if you need to make changes...

This is just one way to accomplish your goal.
 
EWWW How I love this topic!!!!

This is the one topic I can really give my two cents on!!!

You see, as a standalone programmer of over 20 years, I have had to do this a couple of time prior to learning PHP and once heavily on a project in PHP. To further my recognition as knowing what I am speaking of, Mi segunda idioma es Español, que yo aprendi en Mexico y vivia en Chihuahua som 4 años. Tambian tango clientes Mexicanos aque y en el altra lado.

There are several ways you can accomplish this task. The easiest, cheapest, and also the poorest way to do this is to create a link to Altavista that pulls your site in automatically for the visitor (see: http://babelfish.altavista.com/ for a link to assist you in doing this at the bottom of their page). Every time, someone clicks that link, the site will automatically be re-interpreted and displayed.. This is fine except that translated Spanish, by any program I have ever seen, is only 40% to 50% effective. Have you ever gone to a site and tried reading the English and decided that the person who wrote it must have been really really lost when they wrote the text?

What this means is, you must hand interpret your displayed text (not your variable names) so that anything read makes sense to the reader. Next you must store your text some how and as James mentioned, you could have the English and the Spanish embedded in the code but as James said, this is a no, no, no. Why? Because it may seem easy enough to do, but when there is a correction to make, it is harder to find and easier to create errors with. You may also store each phrase in it's own phrase file with extensions depicting eng or spn but this means you will have a lot of files to manage and this can lead to similar errors as embedded text except at this point you have a variable deciding the extension. You could also create a database and with the same variable idea, manage the records pulled from the MySQL database structure. But, the easiest way to manage a fair sized site would be to have a single language file.

Single language file

1) build the site
2) open a text file, remove phrase by phrase from your code the English phrases displayed and replace them with an array variable and very importantly, a comment text so that the code makes sense. Place a line in the text file indicating the array number and then the text on the line below it.
3) Once the entire site is stripped from it's text and replaced with array values, you may test and make sure that the text that should show in fact does show.
(one important note: you are creating two records for every line (or block) of text and your array will have to account for this. DO NOT physically set values to do this, rather create a multiplier variable at the top of your includes or top of your code to multiply the record number by, to account for the two records. You will ALSO need an offset variable to move the pointer forward one position to skip over the notes in this file above each text. This offset will be used later to select language)
4) One up your language file and add the interpretations for every text line directly below the line interpreted. This way, you will now have three lines for every text and you will want to adjust your multiplier at the top to 3.
5) After testing the text, add code to allow a person to switch to Spanish and when they do so, simply have that code adjust your offset up or down.

By doing this in this fashion, you have also opened the door to other languages. To add another language, you would create the text below the Spanish interpretation on each line and add code to adjust the offset to the new language plus adjust your multiplier variable by one more for one more language.


There are a great many more details such as how to use arrays and how to open files from disc in PHP and load them into an array but, this is the best way unless the site is overwhelmingly large. In this case, you may choose text files for each section or to go database.


If you need some tips, please feel free to call me, just be patient, I have to take care of a lot of calls from clients first. If you would rather have it done for you, that can be done also, contact me for pricing. In doing interpretations, I always share the work with another associate who speaks Spanish as his first language and English second. Between he and I, we create some remarkably readable text and unlike others, our interpretations will many times read different in English then in Spanish since we account for culture, class and customs that would affect the way someone reads in their own language.



HMIBarryLSalter -
 
Back
Top