Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Future of Languages in GetSimple
#4
Sorry for reviving an old topic, but I felt like it wasn't appropriate to post this in the Translate plugin topic, which referred me here. Regarding the 'standard to handle plugin languages': when I started developing my first plugin (GS Custom Settings), how to handle languages was one GS standard I just couldn't agree with. 

The current standard  (see http://get-simple.info/wiki/plugins:i18n ) actually demands that language data-files (there, I said it) be written in PHP, the processor. You must feel something is not right. From a Separation of concerns point of view, this makes no sense. All major CMS'es use separate language files written in a data format (Drupal uses .po, Joomla uses .xml, WP allows conversion from .po). 
That's the reason I opted for JSON. It takes two simple calls, 1) to file_get_contents and 2) to json_decode. Although no translation utility exists, it would be dead simple to build one.

The current standard also makes no sense for performance and security.
- include is slower than file_get_contents, because 1) the PHP needs to be parsed, and 2) memory isn't freed up (see https://www.drupal.org/node/1198924).
- Code in include is parsed, and may execute (however unlikely) malicious code.

There, that's my crusade against mixing of concerns Big Grin
Reply


Messages In This Thread
The Future of Languages in GetSimple - by mvlcek - 2011-03-27, 00:01:19
RE: The Future of Languages in GetSimple - by Tyblitz - 2015-06-05, 08:05:35
The Future of Languages in GetSimple - by Connie - 2011-03-27, 01:27:42
The Future of Languages in GetSimple - by ccagle8 - 2011-03-27, 03:10:44



Users browsing this thread: 1 Guest(s)