-
AuthorPosts
-
321fly Friend
321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
May 21, 2013 at 9:45 am #187657How to make –Use default– look like orisite in K2 category settings?
orisite chosen uses en-GB.com_k2.ini instead of ru-RU.com_k2.ini file.
What is the way to make the Orisite use preferred language.com_k2.ini file instead of en-GB.com_k2.ini file?
Otherwise chosing orisite style in K2 category “Read more…”, “Comment”, “Tags” appear in English.Tried to look in category.php in templates/ja_orisite/html/com_k2/templates/orisite but have no idea:((
Copied files from templates/ja_orisite/language/en-GB and pasted to created path: templates/ja_orisite/language/ru-RU, renamed files to ru-RU.com_k2.ini and ru-RU.com_k2.sys.ini
Still orisite chosen shown with English Read more, Tags, Comment….
P.S.Can’t change language directly in language/en-GB folder, because planning to use multiple languages.
321fly Friend321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
May 21, 2013 at 11:12 am #493513Hi there,
there’s an updateIs that so-called “hard code” as written in external thread
I have revealed in templates/ja_orisite/html/com_k2/templates/orisite/category_item.php<!-- Item "read more..." link -->
<div class="catItemReadMore">
<a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
<span><?php echo JText::_('Read more'); ?></span>
</a>
</div>also
<div class="catItemTagsBlock">
<span><?php echo JText::_('Tagged: '); ?></span>
<ul class="catItemTags">
<?php foreach ($this->item->tags as $tag): ?>
<li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li>
<?php endforeach; ?>
</ul>
</div>Looks like I can change that only in .php file and not through .ini or override… If there are other ways pls write. 🙂
In case “Read more” and “Tagged:” etc. might be changed ONLY changing templates/ja_orisite/html/com_k2/templates/orisite/category_item.php file,Please advice, I would like to keep original for English version, while ammended version needed for other language.
I would prefer keeping orisite style in categories. How to use two different category_item.php for two different languages? Or are there any othere decisions?Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
May 22, 2013 at 3:07 am #493570Hi 321fly,
The important note here is that the JText in php file must be the same with it in language ini file.
For example, with ‘Read more’ text:
– In en-GB.com_k2.ini, it has: K2_READ_MORE=”Read more…”
– In php file, the JText should be: <?php echo JText::_(‘K2_READ_MORE’); ?>
Using JText is a good way for multiple language site, just make sure that your appropriate language file has translation for that JText. In your case, you need to have:
– /ru-RU/ru-RU.com_k2.ini file
– and K2_READ_MORE=”your_own_word_here…”Clean JAT3 cache once done.
Hope this makes senses.
1 user says Thank You to Saguaros for this useful post
321fly Friend321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
May 22, 2013 at 12:44 pm #493637Thanks Saguaros!
Before have seen your reply I did (probably wrong, pls say)Copied the original folder:
templates/ja_orisite/html/com_k2/templates/orisiteRenamed:templates/ja_orisite/html/com_k2/templates/orisite-ru
And edited the values right in category.php etc. 😉:laugh: As I did not consider placing the constants instead of values did a strange way – renamed values in php)
<!-- Item "read more..." link -->
<div class="catItemReadMore">
<a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
<span><?php echo JText::_('RENAME - Read more'); ?></span>
</a>
</div>Inconvinence is I will have to choose “theme” settings located by path templates/orisite-ru/category_item.php every time I create a category K2 for ru-Ru-language.
<em>@Saguaros 373780 wrote:</em><blockquote>Hi 321fly,
The important note here is that the JText in php file must be the same with it in language ini file…
</blockquote>Now I followed your advice: inserted a constant ((‘K2_READ_MORE’)) instead of a value (Read more…) in the category.php
<!-- Item "read more..." link -->
<div class="catItemReadMore">
<a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
<span><?php echo JText::_('Read more'); ?></span>
</a>
</div>Cleaned Jat3Cache and it worked!
-
AuthorPosts
This topic contains 4 replies, has 2 voices, and was last updated by 321fly 11 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum