Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Label names in config

Last post 02-17-2008, 12:46 PM by Gradiation. 5 replies.
Sort Posts: Previous Next
  •  01-26-2008, 5:42 PM 38983

    Label names in config

    Hi Guys,

     I was just wondering why are label value defined in the config file? Wouldn't it be easier to just define them in the template, seeing as you only really define the specific templates once in the main template file. Of is there something else i'm missing?

    Cheers

    Matt

  •  01-28-2008, 6:59 AM 39002 in reply to 38983

    Re: Label names in config

    The reason for putting labels into the config file is for internationalization purposes. As a rule (tell me if I've missed any spots) I keep the templates language-free.  Meaning, any visitor-readable word is made into a variable.  That's why you see something like this in the template file:

    $label_find:find

    With this system it's just a matter of translating the config file to allow other languages. 


    Sincerely,

    Carl
    -----
    vine type - content management with standards in mind - vinetype.com
    -----
    Filed under:
  •  01-28-2008, 11:48 AM 39010 in reply to 39002

    Re: Label names in config

    Ahh right,

     Do you think it would be a good idea to externalise these from the config, and potentialy allow multiple language files, so that people don't have to retranslate it all the time? Someone could create a general translation for a language, then depending on the language you set in the config, it chooses a different file? Or is that just overkill?

     Matt

  •  02-08-2008, 12:27 PM 39423 in reply to 39010

    Re: Label names in config

    Gee I thought I was already externalis(z)ing this.  :-)   But I see your point.  If someone chooses culture (BP-QZ) then I load the bp-qz.interface file.  This sounds interesting but it's another file to deal with.  Also, by having it in the config file, it's readily available for you to adjust the wording: "search" rather than "find" or "Please Enter Your Name Here" rather than "Name:"  stuff like that.  I'll keep this in mind but I don't view it as high priority.

    Sincerely,

    Carl
    -----
    vine type - content management with standards in mind - vinetype.com
    -----
    Filed under:
  •  02-17-2008, 12:46 PM 39657 in reply to 39423

    Re: Label names in config

    No problem,

     I think your probably right keeping it simple, it's sometimes hard to know when to stop.

     Matt

  •  02-17-2008, 12:46 PM 39658 in reply to 39423

    Re: Label names in config

    No problem,

     I think your probably right keeping it simple, it's sometimes hard to know when to stop.

     Matt

View as RSS news feed in XML