function ChangeLanguage(languageCode, pageID, pathInsideModule)
{
var req = new JsHttpRequest();
req.onreadystatechange = function()
{
if (req.readyState == 4)
{
if (req.responseJS && req.responseJS.Answer && req.responseJS.Answer.Error)
{
alert(req.responseJS.Answer.Error);
return;
}
document.location.href = req.responseJS.Answer;
}
}
req.caching = false;
req.open('POST', 'http://www.odm-tech.com/en/language.php', true);
req.send({ PageID: pageID, LangCode: languageCode, PathInsideModule: pathInsideModule });
}
function GetTranslation(key)
{
switch (key)
{
case "delete-menu-confirm": return "Please confirm you want to remove menu "%Title%""
case "delete-page-confirm": return "Please confirm you want to remove page "%Title%""
case "has-subpages": return "This page has subpages!"
case "delete-link-confirm": return "Please confirm you want to remove link "%Title%""
case "loading-menu": return "loading menu..."
case "error-loading-menu": return "An error occured while loading menu"
case "saving-menu": return "saving menu..."
case "loading-seo": return "loadnig SEO information..."
case "error-loading-seo": return "An error occured while loading SEO information"
case "saving-seo": return "saving SEO information..."
case "error-saving-sort": return "List of pages were changed. Update sort order is not possible. Please refresh page with [F5]"
case "page-activate": return "Activate page"
case "page-deactivate": return "Deactivate page"
case "page-preview": return "Page preview"
case "page-seo": return "Edit SEO information"
case "page-delete": return "Delete page "%Title%""
case "page-edit": return "Edit page "%Title%""
case "page-hide": return "Hide"
case "page-show": return "Show"
case "page": return "Page"
case "link-delete": return "Delete hyperlink \'%Title%\'"
case "link-edit": return "Edit hyperlink \'%Title%\'"
case "link": return "Link"
case "menu-title": return "Title"
case "menu-description": return "Description"
case "menu-static-path": return "MENU_"
case "admin-menu-site-structure": return "Site Map"
case "admin-menu-template-variables": return "Translations"
case "admin-menu-user-list": return "Users"
case "admin-menu-my-profile": return "My Profile"
case "admin-menu-logout": return "Logout"
case "menu-image-no": return "Not used"
case "menu-image-first-level": return "For first level only"
case "menu-image-all-levels": return "For all levels"
case "meta-title": return "Meta Title"
case "meta-keywords": return "Meta Keywords"
case "meta-description": return "Meta Description"
case "attribute-title": return "Attribute title of the tag <a>"
case "list-info1": return "%Page% of %Total%"
case "list-info2": return "By request "%Request%" found %Total%"
case "remove-image-confirm": return "Please confirm you want to remove this image"
case "removing-image": return "removing image..."
case "error-removing-image": return "An error occured while removing image"
case "save": return "Save"
case "cancel": return "Cancel"
case "msg-no-url": return "Please enter URL for the link"
case "msg-no-page-selected": return "Please choose a page from the list"
case "msg-no-email": return "Please type the E-Mail address"
case "title-site-structure": return "Site Structure"
case "title-page-edit": return "Edit Page Content"
case "title-module-edit": return "Edit Module Page"
case "title-link-edit": return "Edit Link Information"
case "title-user-list": return "Users"
case "title-user-add": return "Add user"
case "title-user-edit": return "Edit user"
case "page-description": return "Description"
case "page-is-removed": return "Page %Title% has been removed"
case "title-empty": return "Title is required"
case "template-is-not-defined": return "Template is not defined"
case "templateset-is-not-defined": return "Template set is not defined"
case "static-path-empty": return "Page URL is required"
case "static-path-is-not-unique": return "This path (URL) already exists. Please choose another path."
case "static-path-incorrect": return "Page URL incorrect! Use latin letters, numbers, hyphens (-), dots (.), and understrikes (_) only."
case "static-path-empty-menu": return "Please enter value for MENU_"
case "static-path-is-not-unique-menu": return "This value of the MENU_ already exists. Please choose another value."
case "static-path-incorrect-menu": return "This value of the MENU_ incorrect! Use latin letters, numbers, hyphens (-), dots (.), and understrikes (_) only."
case "parent-is-not-defined": return "Parent is not defined!"
case "parent-language-different": return "Language of the parent page is not equal to language of the current page. Can\'t be saved."
case "password-is-changed-and-sent": return "Password successfully changed. New password was sent to your E-Mail."
case "logged-out": return "You logged out successfuly"
case "wrong-login-password": return "Incorrect login/password!"
case "new-password": return "New password"
case "open-calendar": return "Click here to expand calendar"
case "your-session-expired": return "Your session expired. Please log in again."
case "unknown-module": return "Module "%Module%" is not found"
case "page-type-is-undefined": return "Page type is undefined"
case "email-is-not-unique": return "This E-Mail already belongs to another user. Please choose another E-Mail."
case "incorrect-email-format": return "Enter correct E-Mail"
case "incorrect-email-address": return "Entered E-mail is not registered on the website"
case "wrong-old-password": return "Old password is incorrect"
case "password-empty": return "Please enter new password"
case "password-not-equal": return "Passwords do not match!"
case "first-name-required": return "Enter first name"
case "last-name-required": return "Enter last name"
case "role-undefined": return "Please choose role for the user"
case "website-undefined": return "Please choose website for the user"
case "user-edit-access-denied": return "Access denied"
case "user-is-updated": return "Information about user has been updated"
case "public-user-is-registered": return "You have been registered successfully"
case "public-user-is-updated": return "Your information has been updated"
case "user-is-removed": return "User %UserList% has been removed"
case "users-are-removed": return "Users %UserList% have been removed. Total %UserCount% user(-s)"
case "home-page": return "Home"
case "sql-error": return "SQL query error. See log for details."
case "upload-max-file-size": return "Max size of the file: %UploadMaxFileSize%"
case "no-templates": return "You have to create file with name page.html under folder %Folder%"
case "template-general": return "General"
case "menu-image1": return "Icon 1"
case "menu-image2": return "Icon 2"
case "menu-image3": return "Icon 3"
case "filesys-file-is-not-uploaded": return "File is not uploaded"
case "filesys-file-doesnt-exist": return "Source file doesn\'t exists"
case "filesys-getimagesize-error": return "Can\'t get image size for the file %File%"
case "filesys-unsupported-image-mime-type": return "Images with mime type "%MimeType%" are not supported"
case "filesys-unsupported-image-function": return "To complete image resizing function %Function% is required. But it is not supported by your hosting provider"
case "filesys-file-upload-error": return "Error occured durig file upload. Error number %ErrorNumber%"
case "filesys-incorrect-file-name": return "File name %FileName% is incorrect. Please rename file and upload it again"
case "filesys-unsupported-file-mime-type": return "Files with mime type "%MimeType%" are not supported"
case "filesys-file-exists": return "File with name %FileName% already exists in folder %FolderName%"
case "filesys-copy-error": return "Error copy file from %From% to %To%"
case "phpmailer-provide-address": return "You must provide at least one recipient email address"
case "phpmailer-mailer-not-supported": return "%Mailer% mailer is not supported"
case "phpmailer-execute": return "Could not execute: %Sendmail%"
case "phpmailer-instantiate": return "Could not instantiate mail() function"
case "phpmailer-authenticate": return "SMTP Error: Could not authenticate"
case "phpmailer-from-failed": return "The following From address failed: %Address%"
case "phpmailer-recipients-failed": return "SMTP Error: The following recipients failed: %Address%"
case "phpmailer-data-not-accepted": return "SMTP Error: Data not accepted"
case "phpmailer-connect-host": return "SMTP Error: Could not connect to SMTP host %Host%"
case "phpmailer-file-access": return "Could not access file: %File%"
case "phpmailer-file-open": return "Could not open file: %File%"
case "phpmailer-encoding": return "Unknown encoding: %Encoding%"
case "error-sending-email": return "Your message has not been sent due to internal server error"
case "incorrect-captcha": return "Incorrect captcha code entered"
case "date-Sun": return "Sun"
case "date-Mon": return "Mon"
case "date-Tue": return "Tue"
case "date-Wed": return "Wed"
case "date-Thu": return "Thu"
case "date-Fri": return "Fri"
case "date-Sat": return "Sat"
case "date-Sunday": return "Sunday"
case "date-Monday": return "Monday"
case "date-Tuesday": return "Tuesday"
case "date-Wednesday": return "Wednesday"
case "date-Thursday": return "Thursday"
case "date-Friday": return "Friday"
case "date-Saturday": return "Saturday"
case "date-Jan": return "Jan"
case "date-Feb": return "Feb"
case "date-Mar": return "Mar"
case "date-Apr": return "Apr"
case "date-May": return "May"
case "date-Jun": return "Jun"
case "date-Jul": return "Jul"
case "date-Aug": return "Aug"
case "date-Sep": return "Sep"
case "date-Oct": return "Oct"
case "date-Nov": return "Nov"
case "date-Dec": return "Dec"
case "date-January": return "January"
case "date-February": return "February"
case "date-March": return "March"
case "date-April": return "April"
case "date-June": return "June"
case "date-July": return "July"
case "date-August": return "August"
case "date-September": return "September"
case "date-October": return "October"
case "date-November": return "November"
case "date-December": return "December"
case "role-integrator": return "Developer"
case "role-administrator": return "Administrator"
case "role-moderator": return "Moderator"
case "role-user": return "User"
case "add-image": return "Add"
case "change-image": return "Change"
case "remove-image": return "Remove"
case "set-sort-order-error": return "Error occured on position update"
case "xml-section-general": return "General"
case "php-messages": return "messages"
case "tag-name": return "Tag Name"
case "variable-value": return "Value"
case "incorrect-parameter": return "Incorrect parameter passed to the VariableList() class"
case "loading-edit-variable": return "loading variable info..."
case "saving-variable": return "saving variable info..."
case "lightbox-image": return "Image"
case "lightbox-of": return "of"
case "module-title": return "Form"
case "config-Email": return "E-mail"
case "config-Subject": return "Subject"
case "config-UseCaptcha": return "Use captha"
case "config-details": return "\r\n <h3>Configuration description</h3>\r\n <p>E-mail - address where to send data from the form</p>\r\n <p>Subject - subject of the e-mail</p>\r\n <p>Use captha - 1 = check captcha code on form submit, 0 = no check</p>\r\n <h3>How to use in the _header.html/_footer.html</h3>\r\n <p><b>FORM_<StaticPath>_URL</b> - URL to the page with the form</p>\r\n "
case "file-not-uploaded": return "File was not uploaded"
case "userauth-title": return "Authorization form"
case "forgot-password-title": return "Restore password"
case "forgot-password-content": return "<p>Please enter E-mail address, with which you registered on the website. After submition new password will be sent to your E-mail.</p>"
case "register-title": return "Registration"
case "register-content": return "<p>Please fill form.</p>"
case "profile-title": return "Personal data"
case "profile-content": return "<p>After you finish with changes, click "Update" button.</p>"
case "contact-title": return "Contact"
case "contact-message": return "Your message has been sent, we will reply to you as soon as possible"
case "contact-error": return "Please fill out all fields correctly"
case "contact-required-LastName": return "Enter your Last name"
case "contact-required-Email": return "Enter your e-mail address"
case "contact-required-CaptchaCode": return "Please enter captcha code"
case "contact-incorrect-Email": return "The format of the e-mail address is incorrect (should be name@yoursite.com)"
case "contact-required-Comments": return "Enter your message"
case "contact-email-FirstName": return "First Name"
case "contact-email-LastName": return "Last Name"
case "contact-email-TTitle": return "Title"
case "contact-email-Company": return "Company"
case "contact-email-Email": return "Email"
case "contact-email-Comments": return "Message"
case "clients-title": return "Contact"
case "clients-message": return "Your message has been sent, we will reply to you as soon as possible"
case "clients-error": return "Please fill out all fields correctly"
case "clients-required-LastName": return "Enter your Last name"
case "clients-required-Email": return "Enter your e-mail address"
case "clients-required-CaptchaCode": return "Please enter captcha code"
case "clients-incorrect-Email": return "The format of the e-mail address is incorrect (should be name@yoursite.com)"
case "clients-required-Project": return "Enter project description"
case "clients-email-FirstName": return "First Name"
case "clients-email-LastName": return "Last Name"
case "clients-email-TTitle": return "Title"
case "clients-email-Company": return "Company"
case "clients-email-Email": return "Email"
case "clients-email-Phone": return "Phone"
case "clients-email-Website": return "Web-site"
case "clients-email-Project": return "Project description"
case "clients-email-Document": return "Attached document"
case "clients-email-Estimate": return "Estimate"
case "clients-email-Budget": return "Budget"
case "clients-email-StartDate": return "Start date"
case "clients-email-Response": return "Respond before"
default: return key;
}
}