diff --git a/fp-plugins/readmore/lang/lang.de-de.php b/fp-plugins/readmore/lang/lang.de-de.php
new file mode 100644
index 0000000..5783532
--- /dev/null
+++ b/fp-plugins/readmore/lang/lang.de-de.php
@@ -0,0 +1,4 @@
+ '[Weiterlesen...]'
+);
diff --git a/fp-plugins/readmore/lang/lang.en-us.php b/fp-plugins/readmore/lang/lang.en-us.php
new file mode 100644
index 0000000..b090dba
--- /dev/null
+++ b/fp-plugins/readmore/lang/lang.en-us.php
@@ -0,0 +1,4 @@
+ '[Read more...]'
+);
diff --git a/fp-plugins/readmore/plugin.readmore.php b/fp-plugins/readmore/plugin.readmore.php
index 8b1441e..4008cc8 100755
--- a/fp-plugins/readmore/plugin.readmore.php
+++ b/fp-plugins/readmore/plugin.readmore.php
@@ -1,91 +1,80 @@
getQuery();
-
-
- if (($q && !$q->single) && !isset($_GET['page'])) {
+
+ $lang = lang_load('plugin:readmore');
+ $readmoreString = $lang ['plugin'] ['readmore'] ['readmore'];
+
+ global $fpdb;
+ $q = & $fpdb->getQuery();
+
+ if (($q && !$q->single) && !isset($_GET ['page'])) {
if ($q)
- list($id) = $q->getLastEntry();
- else
- $id ='';
-
- if ($MODE == 'auto' || $MODE == 'semiauto' ) {
+ list ($id) = $q->getLastEntry();
+ else
+ $id = '';
+
+ if ($MODE == 'auto' || $MODE == 'semiauto') {
if (strlen($string) > $CHOP_AT) {
-
- return substr($string, 0, $CHOP_AT).
- "… [Read More...]";
+
+ return substr($string, 0, $CHOP_AT) . "… " . $readmoreString . "";
}
- }
-
- if ($MODE == 'manual' || $MODE == 'semiauto' ) {
- if (($p = strpos($string, '[more]'))!==false){
- return substr($string, 0, $p).
- "[Read More...]";
+ }
+
+ if ($MODE == 'manual' || $MODE == 'semiauto') {
+ if (($p = strpos($string, '[more]')) !== false) {
+ return substr($string, 0, $p) . "" . $readmoreString . "";
}
} elseif ($MODE == 'sentence') {
$matches = array();
- if ($v=preg_match_all('|[.!?]\s|', $string, $matches, PREG_OFFSET_CAPTURE)) {
-
- if (count($matches[0]) > $CHOP_AT) {
- $string = substr($string, 0, $matches[0][$CHOP_AT-1][1]).
- ". [Read More...]";
+ if ($v = preg_match_all('|[.!?]\s|', $string, $matches, PREG_OFFSET_CAPTURE)) {
+ if (count($matches [0]) > $CHOP_AT) {
+ $string = substr($string, 0, $matches [0] [$CHOP_AT - 1] [1]) . ". " . $readmoreString . "";
}
}
}
-
}
-
- if (($q && $q->single) || isset($fp_params['entry'])) {
+
+ if (($q && $q->single) || isset($fp_params ['entry'])) {
$string = str_replace('[more]', "", $string);
}
-
+
return $string;
}
add_filter('the_content', 'plugin_readmore_main', 1);
-
?>