Author Topic: Language Files  (Read 871 times)

Offline travo

  • Level 18
  • *
  • Posts: 186
  • Reputation: +2/-0
    • View Profile
Language Files
« on: May 14, 2009, 08:04:19 PM »
Just a quick question, do you guys think it is worth coding a game with language file suuport from the beginning just in case? Or should it all be hard coded?

Would using language files be that much slower?

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Language Files
« Reply #1 on: May 15, 2009, 06:12:34 AM »
I'd say it depends upon your target audience and support plans. If you don't already have some sort of language templating system setup, you might spare a thought to creating one in the future so you can just drop it into whatever you're developing. But, as far as it being a 'recommendation;' only if you think the work is justified.

However, keep it in mind that you MIGHT create a template system later and try to write code that can be easily replaced. IE: avoid unnecessary duplication and hard-coding text into the application. Try and call it through a function or from a database instead.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline travo

  • Level 18
  • *
  • Posts: 186
  • Reputation: +2/-0
    • View Profile
Re: Language Files
« Reply #2 on: May 15, 2009, 05:21:02 PM »
I have a template system at the moment, and I have a language system I half use half dont.

I just thought I'd ask before I get too far either way.

I didnt think about the duplication part... Thanks

Offline Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,217
  • Reputation: +28/-1
    • View Profile
Re: Language Files
« Reply #3 on: May 15, 2009, 05:43:24 PM »
Search the forum, there were topics about this with useful info.

Offline travo

  • Level 18
  • *
  • Posts: 186
  • Reputation: +2/-0
    • View Profile
Re: Language Files
« Reply #4 on: May 15, 2009, 06:03:21 PM »
I thought I had read something earlier about it too, but when I searched the forums, nothing came up. I tried lang file, language file, language, lang, nothing came up.

I just tried then and there were tons...  ???

EDIT: I just realised, if your not on the foum homepage and you use search bar at top, it only shows results from that forum... Sorry


Ive created a plugin for smarty that automatically grabs the desired language var, works like a charm, now the PHP side is alot cleaner ;D
« Last Edit: May 15, 2009, 06:08:53 PM by travo »


Offline travo

  • Level 18
  • *
  • Posts: 186
  • Reputation: +2/-0
    • View Profile
Re: Language Files
« Reply #6 on: May 16, 2009, 06:13:32 AM »
Thanks for the links, but  found them when I searched from the forum index, rather than in whatever category I was in.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal