Jump to content

Language system


Acs

Recommended Posts

Hey! I got in a discussion with a few people about how best to do a language system.

 

My way:

I use defines to create the various languages, and when I want to change language I just include the define with the language I want.

This is a good way because with defines I don't have to worry about scope, and they are fast (at least it seems to be fast)

They said this was a bad way because it would take up too much memory

 

Other ways:

One suggested the use of an array. I don't like this way just because of the scope problem. I would always have to use the global $array to access the languages.

One other suggestion was to use gettext. I never used this and just read something about this in the manual. Doesn't seem bad, just a bit complicated to implement.

 

Hope to hear some suggestions from you guys, thanks.

Link to comment
https://forums.phpfreaks.com/topic/103235-language-system/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.