Hello,
thank you for your feature rich extensions and the effort you put into it.
I want my images to have a title in the corresponding language based on the site I'm on (it-en-de).
In which file (and line) can I alter (with an template-override) the title and wrap it with JText::_() in order to get it replaced with an text defined under Joomla Language overrides? Is this also possible with the image description?
Does it make sense to you to implement this in further release?
Thank you!
Reviews and donation are following.
Regards
Using Language overrides for menu title/desc.
-
- Phoca Newbie
- Posts: 4
- Joined: 19 Apr 2016, 19:28
Using Language overrides for menu title/desc.
Last edited by vAlini on 21 May 2016, 21:49, edited 1 time in total.
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Using Language overrides for menu title/desc.
Hi, sorry, I don't understand, Phoca Gallery is standard Joomla! component with all its langauge features, all strings are set in JText::_()
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 19 Apr 2016, 19:28
Re: Using Language overrides for menu title/desc.
Hi,
I wanted to ask if it is possible (when I'm for instance in Category: [ New ] -> General settings) to set for Title*=MY_OWN_TITLE,
and than go to Extensions->Language(s)->Overrides. New -> Setting a Constant MY_OWN_TITLE and define a Text(to replace the string)=Catergory Flowers
If so I won't have to create a new catergory for each language. At the moment I'm not able to do this.
I have done it in the same manner e.g. with Module titles by replacing the the part in :
Hope it is clearer now and that it makes sense what I'm trying to achieve.
Otherwise I'll create a single Catergory for each language in the corresponding language.
Regards
I wanted to ask if it is possible (when I'm for instance in Category: [ New ] -> General settings) to set for Title*=MY_OWN_TITLE,
and than go to Extensions->Language(s)->Overrides. New -> Setting a Constant MY_OWN_TITLE and define a Text(to replace the string)=Catergory Flowers
If so I won't have to create a new catergory for each language. At the moment I'm not able to do this.
I have done it in the same manner e.g. with Module titles by replacing the the part in :
Code: Select all
<?php if ($module->showtitle) { ?> <h<?php echo $headerLevel; ?>><span
class="backh"><span class="backh2"><span class="backh3">[b]<?php echo $module->title; ?>[/b]</span></span></span></h<?php echo $headerLevel; ?>>
<?php };
[b]<?php echo JText::_(strtoupper($module->title));[/b]
Hope it is clearer now and that it makes sense what I'm trying to achieve.
Otherwise I'll create a single Catergory for each language in the corresponding language.
Regards
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Using Language overrides for menu title/desc.
Hi, the multi-language feature in Joomla! does not work this way.
If you have e.g. two languages, you will create two categories, one for first language, second for second language, the same for images.
To add language string as title, yes, there is no such feature that it will be translated - so this needs to be customized directly in the code.
So in fact the same like you did for the module:
Change e.g. in: components\com_phocagallery\views\categories\tmpl\default_categories.php
FROM:
TO:
and of course this string must be added to language string file (ini) of the gallery or common Joomla! language file.
Jan
If you have e.g. two languages, you will create two categories, one for first language, second for second language, the same for images.
To add language string as title, yes, there is no such feature that it will be translated - so this needs to be customized directly in the code.
So in fact the same like you did for the module:
Change e.g. in: components\com_phocagallery\views\categories\tmpl\default_categories.php
FROM:
Code: Select all
$cv->title_self
Code: Select all
JText::_(strtoupper($cv->title_self))
Jan
If you find Phoca extensions useful, please support the project