Read more button plugin

General questions regarding the use of languages in Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
brainiac080195
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Thu Aug 21, 2014 8:33 pm

Read more button plugin

Post by brainiac080195 » Fri Aug 22, 2014 9:56 am

So I am trying to translate the read more button in the bottom of every article in blog category.
here is the link: http://www.skolskibibliotekari.edu.rs/n ... p/aktuelno

I did translation in
en-GB.com_content.ini
but it doesn't seem to help.

I managed to find out that it is regulated by readmore plugin, and I tracked the plugin files. In the plugin folder i found file readmore.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd">
	<name>plg_editors-xtd_readmore</name>
	<author>Joomla! Project</author>
	<creationDate>March 2006</creationDate>
	<copyright>Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>[email protected]</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_READMORE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="readmore">readmore.php</filename>
		<filename>index.html</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_readmore.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_readmore.sys.ini</language>
	</languages>
</extension>
But i can't find language files that are mentioned in this files.
Also this is the site background image:
Image

User avatar
RustyJoomla
Joomla! Explorer
Joomla! Explorer
Posts: 409
Joined: Wed Aug 01, 2007 12:08 am
Location: UK
Contact:

Re: Read more button plugin

Post by RustyJoomla » Fri Aug 22, 2014 10:23 am

The beauty of Joomla 3.x is that it now comes with Language Overrides which you can edit/add in the backend.

Go to here: http://your.site/administrator/index.ph ... ayout=edit

Then under "Search text you want to change" just enter Read more - or whatever text you want to change, select the one from the results then in the left change the language you want to change it to.
Follow me on Twitter - http://twitter.com/RustyJoomla
Company Joomla Website - https://storm.agency

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28191
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Read more button plugin

Post by imanickam » Fri Aug 22, 2014 10:28 am

Reviewed the site and could not figure out the language for the site. I observed that the languages Macedonian and Latin are being used in the site, in addition to English.

In what language you are building the site? Have to tried to find and install the appropriate language packs from http://community.joomla.org/translation ... tions.html?

Also, I believe that the language string could be coming from the language file of the template being used.

In the Global Configuraiton, you could set the language debugger option on and see what are the untranslated strings. After this, you could use the Overrides tab in the Language Manager to create appropriate language strings.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

brainiac080195
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Thu Aug 21, 2014 8:33 pm

Re: Read more button plugin

Post by brainiac080195 » Fri Aug 22, 2014 1:02 pm

On the suggestion i installed sr-RS language pack but it still didn't work. Activated the language debugger and it didn't find "Read more" as untranslated strings. So what am I doing wrong?

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28191
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Read more button plugin

Post by imanickam » Sat Aug 23, 2014 2:03 am

You may not be doing anything wrong... It could be due to the template that is being used.

Try to make one of the templates such as Protostar and see whether the same behavior is exhibited.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

brainiac080195
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Thu Aug 21, 2014 8:33 pm

Re: Read more button plugin

Post by brainiac080195 » Sat Aug 23, 2014 10:37 am

imanickam wrote:You may not be doing anything wrong... It could be due to the template that is being used.

Try to make one of the templates such as Protostar and see whether the same behavior is exhibited.
As suggested I did change the template and the translation was perfectly done. What is the next step as it seems the theme is the problem.

Here is the link to it:
http://beautiful-templates.com/evo/st-s ... templates/

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28191
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Read more button plugin

Post by imanickam » Tue Aug 26, 2014 5:13 am

Reviewed the template and found out that the text "Read more" is coming from a hard-coded text string available in the following line of code that is available in the file blog_item.php that is located in the directory \templates\st_study\html\com_content\category.

Code: Select all

        <div class="readmore">
            <a class="btn" href="<?php echo $link; ?>">
                <?php if (!$params->get('access-view')) :
            		echo JText::_('Read more');
            	elseif ($readmore = $this->item->alternative_readmore) :
            		echo $readmore;
            		if ($params->get('show_readmore_title', 0) != 0) :
            		echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
            		endif;
            	elseif ($params->get('show_readmore_title', 0) == 0) :
            		echo "Read more";
            	else :
            		echo JText::_('COM_CONTENT_READ_MORE');
            		echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
            	endif; ?>
            
        	</a>
        </div>

There are multiple ways to handle the situation.
  1. If you do not want to change the code, in the individual articles, in the Edit screen (i.e., Article Manager: Edit Article), in the tab Options, for the option "Read More Text", enter the appropriate text. I would suggest this way as it is very clean.
  2. If you want to change the code, you could create a new language string for this or use an existing language string (with an override if needed) and use that language string constant in the code (e.g., echo Jtext::_('COM_CONTENT_READ_MORE');) instead of the hard-coded value "Read more". However, with this approach, whenever the template is updated, this code may be overwritten.
Hope this helps...
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

brainiac080195
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Thu Aug 21, 2014 8:33 pm

Re: Read more button plugin

Post by brainiac080195 » Tue Aug 26, 2014 10:36 am

imanickam wrote:Reviewed the template and found out that the text "Read more" is coming from a hard-coded text string available in the following line of code that is available in the file blog_item.php that is located in the directory \templates\st_study\html\com_content\category.

Code: Select all

        <div class="readmore">
            <a class="btn" href="<?php echo $link; ?>">
                <?php if (!$params->get('access-view')) :
            		echo JText::_('Read more');
            	elseif ($readmore = $this->item->alternative_readmore) :
            		echo $readmore;
            		if ($params->get('show_readmore_title', 0) != 0) :
            		echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
            		endif;
            	elseif ($params->get('show_readmore_title', 0) == 0) :
            		echo "Read more";
            	else :
            		echo JText::_('COM_CONTENT_READ_MORE');
            		echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
            	endif; ?>
            
        	</a>
        </div>

There are multiple ways to handle the situation.
  1. If you do not want to change the code, in the individual articles, in the Edit screen (i.e., Article Manager: Edit Article), in the tab Options, for the option "Read More Text", enter the appropriate text. I would suggest this way as it is very clean.
  2. If you want to change the code, you could create a new language string for this or use an existing language string (with an override if needed) and use that language string constant in the code (e.g., echo Jtext::_('COM_CONTENT_READ_MORE');) instead of the hard-coded value "Read more". However, with this approach, whenever the template is updated, this code may be overwritten.
Hope this helps...
Thanks, the first solution works perfect for me.


Locked

Return to “Language - Joomla! 3.x”