The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




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: 4 Guest(s)