knitting

Author Topic: Explanation Wanted :-)  (Read 468 times)

jjk

  • Global Moderator
  • Hero Member
  • *
  • Posts: 2004
Explanation Wanted :-)
« on: August 11, 2011, 09:33:45 AM »
Is there a strict separation between backend language keys and frontend language keys in the code? The reason I'm asking this is that there are a number of identical keys in the backend and frontend .ini files. In these cases the result is that the string attached to the backend key is shown in the frontend if the key exists in both, backend ini and frontend ini. This might lead to some confusion when users try to customize frontend strings, because their customized string would be overwritten by the backend ini.

Two example keys which are in both, backend and frontend ini files:
COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL
COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL

In case of these two above, I could just delete the backend keys/strings if there is no reason to keep them in the backend ini.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Hero Member
  • *
  • Posts: 4184
  • VM2 ready to take off
    • VM2 Extensions
  • VirtueMart Version: 2.1
Re: Explanation Wanted :-)
« Reply #1 on: August 11, 2011, 11:43:16 AM »
This is strictly seperated for performance reason.

the FE language file is only 30% of the backend file. So we dont want to load the backend file for some language tags that are the same.
Seminar/Workshop for virtuemart by the core team http://extensions.virtuemart.net/certifications/certification-of-virtuemart-2-detail
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jjk

  • Global Moderator
  • Hero Member
  • *
  • Posts: 2004
Re: Explanation Wanted :-)
« Reply #2 on: August 11, 2011, 12:59:58 PM »
Hi,

Probably I didn't express myself clearly  :-[ - basically I want to know if I can delete the keys mentioned above in the backend ini file, because the keys/strings are part of the frontend product details view. The problem is that these strings in the frontend product details view are currently loaded from the backend ini file (at least in J1.7). If I understand you correctly that is something you want to avoid.

I suppose there are a few more of such "duplicate" keys in the ini files which cause both the frontend and the big backend ini files to be loaded, while somebody looks at the frontend.  ;)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Hero Member
  • *
  • Posts: 4184
  • VM2 ready to take off
    • VM2 Extensions
  • VirtueMart Version: 2.1
Re: Explanation Wanted :-)
« Reply #3 on: August 12, 2011, 05:42:52 AM »
Ohh yes, you are right.

Due the language system with generic messages we have to load the backend also in the frontend. I missed that. Maybe we should have 3 language files,... core, BE and FE.
Seminar/Workshop for virtuemart by the core team http://extensions.virtuemart.net/certifications/certification-of-virtuemart-2-detail
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

VirtueMart Forum

Re: Explanation Wanted :-)
« Reply #3 on: August 12, 2011, 05:42:52 AM »