diff -r da45dd7fc9ec -r ca59733d84da plugins/Cortado.php
--- a/plugins/Cortado.php Wed Mar 05 17:23:19 2008 -0500
+++ b/plugins/Cortado.php Sun Mar 16 01:43:46 2008 -0400
@@ -31,6 +31,7 @@
function cortado_process(&$text)
{
global $db, $session, $paths, $template, $plugins; // Common objects
+ global $lang;
$match_count = preg_match_all('#\[\[:' . preg_quote($paths->nslist['File']) . '([^]]+?\.ogg)(\|video)?\]\]#is', $text, $matches);
if ( $match_count < 1 )
@@ -57,11 +58,12 @@
+ {lang:cortado_err_no_java}
@@ -87,7 +89,7 @@
if ( !$acl->get_permissions('read') )
{
// No permission to read this file
- $text = str_replace_once($entire_match, "Access denied to file {$filename} - not embedding media player applet.", $text);
+ $text = str_replace_once($entire_match, "" . $lang->get('cortado_err_access_denied', array('filename' => $filename)) . "", $text);
continue;
}
@@ -109,4 +111,54 @@
$text = str_replace_once($entire_match, $applet_parsed, $text);
}
-}
\ No newline at end of file
+}
+
+/**!language**
+
+The following text up to the closing comment tag is JSON language data.
+It is not PHP code but your editor or IDE may highlight it as such. This
+data is imported when the plugin is loaded for the first time; it provides
+the strings displayed by this plugin's interface.
+
+You should copy and paste this block when you create your own plugins so
+that these comments and the basic structure of the language data is
+preserved. All language data is in the same format as the Enano core
+language files in the /language/* directories. See the Enano Localization
+Guide and Enano API Documentation for further information on the format of
+language files.
+
+The exception in plugin language file format is that multiple languages
+may be specified in the language block. This should be done by way of making
+the top-level elements each a JSON language object, with elements named
+according to the ISO-639-1 language they are representing. The path should be:
+
+ root => language ID => categories array, strings object => category \
+ objects => strings
+
+All text leading up to first curly brace is stripped by the parser; using
+a code tag makes jEdit and other editors do automatic indentation and
+syntax highlighting on the language data. The use of the code tag is not
+necessary; it is only included as a tool for development.
+
+
+{
+ // english
+ eng: {
+ categories: [ 'meta', 'cortado' ],
+ strings: {
+ meta: {
+ cortado: 'Cortado plugin'
+ },
+ cortado: {
+ err_no_java: 'Your browser doesn\'t have a Java plugin. You can get Java from java.com.',
+ err_access_denied: 'Access to file "%filename%" is denied, so the media player can\'t be loaded here.',
+ btn_play: 'Play',
+ btn_pause: 'Pause',
+ btn_stop: 'Stop'
+ }
+ }
+ }
+}
+
+
+**!*/
\ No newline at end of file