Hi!
I wanted to translate the jquery.validationEngine-en.js file to my language, no problem, i did it easly.
BUT
These lines are not allowing the usage of the translated file, because my language is not listed below:
$existingLang = array("cz", "da", "de", "en", "es", "fr", "it", "ja", "nl", "pl", "pt", "ro", "ru", "tr");
if (!in_array ($lang, $existingLang)) {
$lang = "en";
}
Found in: administrator/com_virtuemart/helpers/config.php, Starting from line 1144.
Hardcoding these shortcodes is not the best way, use file_exists or something instead.
I had to place my translation into the -en.js file, becase i dont want to hack core.
Version: 2.0.16
thx, changed to
/*$existingLang = array("cz", "da", "de", "en", "es", "fr", "it", "ja", "nl", "pl", "pt", "ro", "ru", "tr");
if (!in_array ($lang, $existingLang)) {
$lang = "en";
}*/
$vlePath = vmJsApi::setPath('languages/jquery.validationEngine-'.$lang);
if(file_exists($vlePath) and !is_dir($vlePath)){
vmJsApi::js( 'languages/jquery.validationEngine-'.$lang );
} else {
vmJsApi::js( 'languages/jquery.validationEngine-en' );
}