Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Updating Language constants dynamically

    Quote Originally Posted by coldasice1234 View Post
    Can you clarify the difference between the language files and the database configuration table, in terms of which one over-rides the other? If I changed the values in the database - are they reflected through the site or are they over-ridden by the language files?
    Neither.

    The language definitions are not contained in the database.
    The configuration table is used for configuration settings, not language content.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #12
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Updating Language constants dynamically

    Quote Originally Posted by coldasice1234 View Post
    If I want to do this without affecting security, is there a method of achieving this?
    Yes -- use the database alternative we've been discussing:

    Quote Originally Posted by coldasice1234 View Post
    I think an alternative may then be to set up the new defines to be canged to be changed in the database directly, and should I require to add custom defines then I can just add rows to the database tables where necessary / create a new custom table.
    Quote Originally Posted by DrByte View Post
    If you want to rewrite the language infrastructure to use the database instead, keep in mind the need to support multiple languages and also to handle code upgrades. You'll still need to create a user interface to present and collect the information, then validate it and save it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #13
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Updating Language constants dynamically

    Quote Originally Posted by coldasice1234 View Post
    Do you know if the values are usually taken from the database first and then placed into the files or are they never 'syncronised' and if not which values are taken as being the 'main' ones the database or the language files?
    It all depends how you write your custom code.

    A constant is ... well ... constant. It never changes once defined. So, whatever you set it to be, it will be. You can't change it later without loading a new page.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v152 Forcing a script to use constants from a specific language
    By torvista in forum Addon Language Packs
    Replies: 3
    Last Post: 17 Jan 2014, 12:16 AM
  2. List constants from a specific language file?
    By torvista in forum General Questions
    Replies: 3
    Last Post: 8 Jul 2011, 08:15 PM
  3. Constants coming up instead of text assigned to constants
    By blk00xjc in forum General Questions
    Replies: 3
    Last Post: 25 Mar 2009, 10:11 PM
  4. Just finished updating Hebrew language pack
    By murlex in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Jan 2009, 12:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg