I have recently purchased one of the website translation scripts available on the internet which I intend to use on my network of websites.
The translation script is creating some presentation problems in various languages so I need a small script written which I can use as an include to allow me to fix these problems on a page-by-page basis.
I need a script that will read the URL of the current page and set a variable that can be used to decide if other includes should be used or not.
The URL's of the pages take the form of:
1. [login to view URL]
2. [login to view URL]
3. [login to view URL]://[login to view URL]
The script should return english for the 1st example and spanish for the 2nd and 3rd examples.
It should return spanish (and not english) if the URL was [login to view URL]://[login to view URL]
It should be configurable so that if I was to install the translation script to a folder rather than root, I can input this data and it would still work (i.e. if the URL was [login to view URL])
I would also like the following options (fully commented and easily configurable/removable by myself on a site-by-site basis):
1. Set figures for x and y (fully commented on how to add a and b, c and d, etc.) to enable CSS placement of content on pages in anything other than english or for individual languages
2. Set a keyword variable on pages in anything other than english or for individual languages (i.e. if I use "'Keyword' Sitemap" as a text link, the Keyword can be set to '' if the translation is too long, fully commented on how to add further variables if necessary)
The languages being used are:
english, spanish, german, french, italian, portuguese, japanese, korean, chinese (which should be returned as en, de, es, fr, it, pt, ja, ko, zh)
The script needs to be fully commented so I can configure/remove parts myself and so that I can learn from your work.
I will also need examples of how to implement the script (i.e. if I want to include something for any page that is anything other than english or for individual languages)
This should be simple for anyone who knows their stuff.