From a8e3505b21118c439d5d50f203c8174068bb58cf Mon Sep 17 00:00:00 2001 From: secretr Date: Fri, 9 Oct 2009 15:07:44 +0000 Subject: [PATCH] Tagwords - better multi-language handling --- e107_plugins/tagwords/languages/English.php | 2 ++ e107_plugins/tagwords/section/e_tagwords_news.php | 2 +- e107_plugins/tagwords/section/e_tagwords_page.php | 2 +- e107_plugins/tagwords/tagwords_shortcodes.php | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/e107_plugins/tagwords/languages/English.php b/e107_plugins/tagwords/languages/English.php index ffb027a58..3f1312bc5 100644 --- a/e107_plugins/tagwords/languages/English.php +++ b/e107_plugins/tagwords/languages/English.php @@ -63,4 +63,6 @@ define("LAN_TAG_OPT_26", "display"); define("LAN_TAG_MENU_1", "view complete tagwords cloud"); define("LAN_TAG_MENU_2", "Tagwords"); +define("LAN_TAG_CORE_NEWS_1", "News"); +define("LAN_TAG_CORE_CPAGES_1", "Pages"); ?> \ No newline at end of file diff --git a/e107_plugins/tagwords/section/e_tagwords_news.php b/e107_plugins/tagwords/section/e_tagwords_news.php index 3b5f9edd2..510b38ce0 100644 --- a/e107_plugins/tagwords/section/e_tagwords_news.php +++ b/e107_plugins/tagwords/section/e_tagwords_news.php @@ -13,7 +13,7 @@ class e_tagwords_news $this->settings['plugin'] = ""; $this->settings['table'] = "news"; $this->settings['db_id'] = "news_id"; - $this->settings['caption'] = "news"; + $this->settings['caption'] = "LAN_TAG_CORE_NEWS_1"; } function getLink($id) diff --git a/e107_plugins/tagwords/section/e_tagwords_page.php b/e107_plugins/tagwords/section/e_tagwords_page.php index 6b9446dc0..5be231aa3 100644 --- a/e107_plugins/tagwords/section/e_tagwords_page.php +++ b/e107_plugins/tagwords/section/e_tagwords_page.php @@ -13,7 +13,7 @@ class e_tagwords_page $this->settings['plugin'] = ""; $this->settings['table'] = "page"; $this->settings['db_id'] = "page_id"; - $this->settings['caption'] = "page"; + $this->settings['caption'] = "LAN_TAG_CORE_CPAGES_1"; } function getLink($id) diff --git a/e107_plugins/tagwords/tagwords_shortcodes.php b/e107_plugins/tagwords/tagwords_shortcodes.php index 21e50ed83..5e394d811 100644 --- a/e107_plugins/tagwords/tagwords_shortcodes.php +++ b/e107_plugins/tagwords/tagwords_shortcodes.php @@ -9,8 +9,8 @@ * Tagwords Shortcodes * * $Source: /cvs_backup/e107_0.8/e107_plugins/tagwords/tagwords_shortcodes.php,v $ - * $Revision: 1.7 $ - * $Date: 2009-09-25 20:13:12 $ + * $Revision: 1.8 $ + * $Date: 2009-10-09 15:07:44 $ * $Author: secretr $ * */ @@ -99,7 +99,7 @@ class tagwords_shortcodes function sc_tag_area_heading() { global $tag; - return varsettrue($tag->area->settings['caption']); + return (varsettrue($tag->area->settings['caption']) ? defset($tag->area->settings['caption'], $tag->area->settings['caption']) : ''); } function sc_tag_link($parm, $sc_mode)