Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,591
    Plugin Contributions
    30

    Default List constants from a specific language file?

    In the interests of providing a list of the language constants in each file to a translator for proof-reading and to get a word-count, my question is... how?

    I have found how to list all constants:
    $const = get_defined_constants();

    echo "<pre>";
    print_r($const);
    but how can I extract/list/print the phrases contained in one particular file only?

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,591
    Plugin Contributions
    30

    Default Re: List constants from a specific language file?

    Either this is is such a menial task that any fool should know how to do it or its too hard for the experts here?

    I am stuck with this.

    I just need to see a list of the phrases on the screen to be able to paste them into Word.

    Many phrases have html formatting in them so pasting into Excel and stripping the phrases by the delimiters does not work:
    http://www.translatorscafe.com/cafe/article113.htm#lng

    By the way, I am updating and paying someone to correct the Portuguese language pack, so some community help would be appreciated.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: List constants from a specific language file?

    1. grab the value of get_defined_constants()
    2. then load the page of defines
    3. then grab the new value of get_defined_constants()
    4. then get an array_diff of the two values
    .

    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.

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,591
    Plugin Contributions
    30

    Default Re: List constants from a specific language file?

    Many thanks.
    Done!

 

 

Similar Threads

  1. Replies: 0
    Last Post: 17 Jul 2014, 08:17 AM
  2. 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
  3. Replies: 2
    Last Post: 11 Feb 2013, 09:02 PM
  4. Where are page specific language file included?
    By damiantaylor in forum General Questions
    Replies: 5
    Last Post: 17 Jul 2012, 07:05 PM
  5. Updating Language constants dynamically
    By coldasice1234 in forum Basic Configuration
    Replies: 12
    Last Post: 6 Sep 2007, 09:15 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR