Fork me on GitHub

Language Definition from Database  Bottom

  • I'm looking to set a language definition to draw it's def from the database, but I can't get the syntax. Obviously, I need to have something on my site that is dynamically updated, but since the usual language definitions are hard coded, I'm having a bit of a headache getting this to work.

    Basically, I'd like to take

    Code

    define('_LANGDEF' , 'Language Definition');


    and have it be

    Code

    define('_LANGDEF' , '$langDef');


    where the variable is an SQL statement.

    Does this make sense? What am I missing? Would I place the SQL statement in the definition file? Any help is greatly appreciated.
  • Mark, dont quote the '$langDef' - PHP takes the single quotes to mean a literal string, hence making your define output $langDef.

    Other than that, an SQL statement in the lang define file should be fine. You could use module vars to store your lang defines, if there are not very many.

    What's wrong with using the system normally? ;)

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • 0 users

This list is based on users active over the last 60 minutes.