Need help with email language overrides and general you got to be kidding me's

Started by kittmaster, October 06, 2015, 16:19:57 PM

Previous topic - Next topic

kittmaster

Using Joomla 3.4.4 & VM 3.0.10.

I'm using overrides for the HTML mail, ran across an issue with the mail_html_shopper.php



<tr>
  <td colspan="3"><p>
<?php echo vmText::sprintf('COM_VIRTUEMART_MAIL_ORDER_STATUS',vmText::_($this->orderDetails['details']['BT']->order_status_name)) ; ?>
</p></td> 
 
  </tr>


My issue was using the language overrides to change COM_VIRTUEMART_MAIL_ORDER_STATUS to what I needed.....and after trying 6 ways to Sunday to try and figure out why it wouldn't change......I discovered a complete alternate set of language files here:

yoursite.com/components/com_virtuemart/language/en-GB


The language override does NOT affect anything in this location which is also where this CONSTANT is being pulled from. I only know this because I hard modified that .ini to validate that is what my issue is and sure enough my HTML email works correctly.

Everyone harps on not hacking the core but the language override does not affect these files at the above location.

It does affect:

yoursite.com/administrator/language/en-GB
yoursite.com/language/en-GB


So my question is, why is there a THIRD set of language files in the component locations that are NOT affected by language overrides? I tried to add an override folder and an .ini file to see if a local override would work and it doesn't.....so I literally have to hack the core to make this right.

Does anyone have any insight as to how I'm supposed to properly handle this without hacking the core?

This is very frustrating.


jenkinhill

VM language files  should only be in components/com_virtuemart/language/ or in administrator/components/com_virtuemart/language and can be overwritten. I make overrides every time I build a VM site with no problem.

I don't know why overrides are not working for you, as I can edit COM_VIRTUEMART_MAIL_ORDER_STATUS as a site override with no issues.  You should not have any VM language files  in Joomla's language directory
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

kittmaster

Ok.

This was a clean install, no upgrades or anything like that and being tested on a subdomain.

This is the way that it installed.

Don't get me wrong, the front end overrides are working as expected....it is just a specific issue with the email part that I found to be a problem.

I'll delete the language files from:

yoursite.com/language/en-GB

Do you think that will solve the problem?

Thanks for your help.
Chris

jenkinhill

I don't know if having a language file in J's language directory will cause the problem that you have. I have never experienced problems with overrides.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

kittmaster

Well I guess I'm confused.

I deleted the files as mentioned, same behavior.

So a question arises, if you mention it shouldn't be in the J directory language paths, then why is the overrides being stored there for all of my strings?

yoursite.com/language/overrides

Every change I've ever made thus far with 3.0.9 upgraded to 3.0.10, all the overrides are begin stored there.

The issue is only specific to the one part of the email header, I've overridden the invoice_items.php with success and a bunch of others.....all work, its just the initial file I mentioned above in first post.

But even after deleting the language from the joomla's language folder, the problem persists.

Any other ideas?
Thanks,
Chris

kittmaster

Quote from: jenkinhill on October 06, 2015, 17:29:22 PM
VM language files  should only be in components/com_virtuemart/language/ or in administrator/components/com_virtuemart/language and can be overwritten. I make overrides every time I build a VM site with no problem.

I don't know why overrides are not working for you, as I can edit COM_VIRTUEMART_MAIL_ORDER_STATUS as a site override with no issues.  You should not have any VM language files  in Joomla's language directory

I did some generic searching and came across this:

http://docs.virtuemart.net/tutorials/33-templating-layouts/107-customization-of-displayed-text.html

which is exactly the opposite of what you said here..... has something changed?

There are other forum posts that you mention and they never say anything about com_virtuemart as being part of those paths.....has this changed with version 3?

Here is a quote from the article:

In order to avoid this, Joomla provides override folders for the frontend and backend language files, into which you can place override language files for each language you use. For example the location for your english language override files is:
Frontend: yourdomain\language\overrides\en-GB.override.ini
Backend: yourdomain/administrator/language/overrides/en-GB.override.ini

Thanks.

kittmaster

I just thought of something that may help you help me.

I went from 2.0.8 to 3.0.9 and upgraded to 3.0.10.

When I did this on the subdomain for testing, I installed new files, but started off with the 2.5 database and let it upgrade it during the install.

My guess would be that is part of the problem. As I have 90K products online, I didn't want to try and redo all that with images.

Is there something in the database that could be causing a split version of look here then there based on the language files?

Hopefully this may help?

Thanks,
Chris

jenkinhill

That way of updating can cause problems. You should simply use Joomla's extensions installer on the 2.0.8 site to install 3.0.10  main component immediately followed by the 3.0.10 aio component - the updater does all the file handling - I have never had a VM component problem updating VM2-3. You do this on a copy of the main site, of course, so you can do thorough testing.

BTW this may help:  http://docs.virtuemart.net/manual/general-concepts/214-multilanguage-and-multlingual.html 

and from Joomla's https://docs.joomla.org/Specification_of_language_files is
Quote
Each extension can also have "local" translation files, inside its own front- or back-end directory. For example, you can have a language ini for GB English in administrator/components/com_foobar/language/en-GB/en-GB.com_foobar.ini. These "local" files do not need to be mentioned in your extension's XML manifest file. In fact, a user can always create a language directory inside your extension's directory, create a sub-directory named after his language and inside it create a language INI file with his desired language overrides.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

kittmaster

At this point the site is nearly feature complete.

Are you saying that if I were to install 3.4.4, and 2.0.8 with that starting database, it will update to 3.0.10 without an issue?

The system in near 98% operational minus this one little issue, I really don't want to try and start over. In fact I'm almost ready to make it live within the next day or two.

Is there some variable in the database or router.php (or whatever handles language pointing) file that could correct this behavior?

I can do the work, just need to know where to look.

Thanks,
Chris