×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Multiple language - translation of categories and

Multiple language - translation of categories and 9 years 2 months ago #30043

  • Vilhelm Kruse
  • Vilhelm Kruse's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 48
  • Thank you received: 10
Multiple language - translation of categories and events.
You write in another thread that it is possible to use the joomla translation system to translate Event titles and Category titles.
I would like to know how to do that specifically.
I have tried to use ##MY_EVENT_123## and do a translation override. But I can't get it to work.
I would be very pleased if you provided a workable solution.
I see it working fine with the templates. But I can't get that to work anywhere else.

Best regards
Vilhelm
The following user(s) said Thank You: ewhitewhite, ranlaveresteph

Multiple language - translation of categories and 9 years 2 months ago #30056

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Hi Vilhelm,

you only use ##..## in the templates - in the title etc. it works different - for example you inert a title like:

COM_MATUKIO_MY_EVENT_NAME

And for that you can now create a language override.

But please note that this has some downsides (some sort of hack) i would always suggest you use different menu entries etc. per language.

Kind regards,

Yves
The following user(s) said Thank You: ewhitewhite

Multiple language - translation of categories and 9 years 2 months ago #30065

  • Vilhelm Kruse
  • Vilhelm Kruse's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 48
  • Thank you received: 10
Yes I got that to work now. The reason it did not work for me was that I combined COM_MATUKIO_MY_EVENT_NAME with other text in the same field. That failed.

BUT there are problems. Check out the COM_MATUKIO_MY_EVENT_NAME in the category name in the breadcrumb and in the category in the list. The text is suppose to read: Pinse for piger but it does not grab the translation. Why would that be?

Live site here:
www.tantravaerkstedet.dk/kalender/liste
Attachments:
The following user(s) said Thank You: ewhitewhite

Multiple language - translation of categories and 9 years 2 months ago #30069

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Yep on some areas there is no translation done of the input (like categories or breadcrumbs). That's the reason it's normally better to use different menu entries. :(

Yves
The following user(s) said Thank You: ewhitewhite

Multiple language - translation of categories and 9 years 2 months ago #30073

  • Vilhelm Kruse
  • Vilhelm Kruse's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 48
  • Thank you received: 10
So in other words that solution with using the Language override does not work at all :(
So the only real solution is double up on categories and double up on events and having the trouble of manually adjusting the number of participants. We are talking completely separate events in order to go multilingual? (if you wanna be able to control the content of the category and the breadcrumb)
Not exactly the solution I had dreamed about...

Vilhelm
The following user(s) said Thank You: ewhitewhite

Multiple language - translation of categories and 9 years 2 months ago #30074

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
When it's just about breadcrumbs and the categories text, then i can tell you the two things you would need to change / make a template overrides for (Really simple, just one single line, should be 2 minutes). But as i said that system in fact is not ideal (like the whole multi language system in Matukio / Joomla), the other "normal" solution is also not perfect and has some downsides too.

Kind regards,

Yves
The following user(s) said Thank You: ewhitewhite

Multiple language - translation of categories and 9 years 2 months ago #30075

  • Vilhelm Kruse
  • Vilhelm Kruse's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 48
  • Thank you received: 10
OK. Let's let's try the hack. I think it would be worth to try it....
The following user(s) said Thank You: ewhitewhite

Multiple language - translation of categories and 9 years 2 months ago #30077

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Categories:

administrator/components/com_matukio/helpers/rendering.php

Search for:

$html[] = '<strong>' . $c->text . '</strong>';

(Should be somewhere around line 1140)

Replace it with

$html[] = '<strong>' . JText::_($c->text) . '</strong>';

Breadcrumbs:

components/com_matukio/views/event/view.html.php

MatukioHelperUtilsBasic::expandPathway($event->title, "");

Replace it with:

MatukioHelperUtilsBasic::expandPathway(JText::_($event->title), "");

So basically it's just always adding JText::_(....) around it :-)

Kind regards,

Yves
The following user(s) said Thank You: ewhitewhite

Multiple language - translation of categories and 9 years 2 months ago #30078

  • Vilhelm Kruse
  • Vilhelm Kruse's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 48
  • Thank you received: 10
Thanks. There were two more references but I found them.
So why not just make this change to the source in the next release?
The following user(s) said Thank You: ewhitewhite
  • Page:
  • 1
Time to create page: 0.171 seconds