Event Listing 2 template translation

May 2014 Joomla Template
GK User
Sat Feb 14, 2015 6:29 pm
Hello,
My websites language is Polish and I want to use "Event Listing 2" template on K2 category list. Unfortunately in this view all information (day of week, month, read more) are displaying in English. When you go to the front page - "latest events" is OK, when you go to the event - everything's cool. But when I use "event_listing2" as in category view, I still have English details.
Image

What should I do to fix it?

My url is http://www.goksezam.pl/14
User avatar
Fresh Boarder

teitbite
Mon Feb 16, 2015 12:27 pm
Hi

You need to translate K2 component. Just look for a translated language file on the web or copy english polish language folder and translate.
User avatar
Moderator

GK User
Mon Apr 13, 2015 9:50 am
Hi, I have the same problem.

I tried to translate languaje files from k2 and still display in English. At frontpage and article view the date is OK.

If I remove category_item.php from: gk_university/html/com_k2/templates/events_listing2/ the date is corectly displayed but I loose the style.

Can you help us?
Thank you
User avatar
Fresh Boarder

teitbite
Wed Apr 15, 2015 9:54 am
Hi

Please tell me the url to the exact page with this date and tell me which one is it.
User avatar
Moderator

GK User
Thu Apr 23, 2015 2:26 pm
Hi

I have the same problem.

Tried to edit different K2 and Joomla language files in which I could find the english words related to dates, weekdays etc.

I have installed the latest version of the Joomla University template. Like mentioned in this tread the weekdays etc. shows correctly (in danish) on the frontpage but not when displaying a list of events, using 'Event_Listing2' template settings.

The site is still offline, why I can't provide a link.

Thanks in advance
/ Kristian
User avatar
Fresh Boarder

teitbite
Fri Apr 24, 2015 5:18 pm
Hi

I'm looking at code in /html/com_k2/templates/events_listing2/category_item.php and there is no date format used here. So I believe it's being pulled directly from item as it was entered. Please compare syntax in category layout and event alone.
User avatar
Moderator

GK User
Mon Apr 27, 2015 8:59 am
Hi again

I have checked the relevant items and category, but in my view there seems to be no problems. But I might be wrong.

Could the language used in the mentioned category-view be related to the geografical location of the server in any way..

No matter the reason I really need your assistance in terms of having dates, weekdays etc. shown in danish instead of english.

All the best & thanks beforehand
/ Kristian
User avatar
Fresh Boarder

teitbite
Wed Apr 29, 2015 2:21 pm
Hi

I cannot see Your site, but I've just checked @JarekHM site. Please look here http://www.goksezam.pl/event/item/366-s ... erowo.html

He used a date format He needed and module displayed same used in k2 item.
User avatar
Moderator

teitbite
Sat May 09, 2015 3:56 pm
Hi

I found a PM from You about this thread. But when I visit Your site date format looks ok. Was using the desired format in content a good answear ? Or You did something else ?
User avatar
Moderator

GK User
Mon May 11, 2015 10:29 am
Hi

The issue is not solved yet as the event information still shows in english and not danish.. Does it show in danish at your end?

Best
/ Kristian

PS: Furthermore I have a problem with the calendar function, as the calendar shows that there is an event the 12th of may, eventhough it is the 13th of may! If I click on the 12th I will be redirected to the event that is set to be held the 13th.
User avatar
Fresh Boarder

teitbite
Mon May 11, 2015 4:44 pm
Hi

Calendar is not related with events. It's a K2 extension displaying a day when K2 item was created, so You can see all articles from one day.

For the date language. Look here: https://demo.gavick.com/joomla25/univer ... e-features
Date is set in articles with a HTML code, so You should just be able to simply use Your names there instead.
User avatar
Moderator

GK User
Wed May 13, 2015 11:52 am
Hi

Thank you for the answer. I now understand what controls the calendar - although I need to set 'created-date' to the 14th if I want it to show on the 13th. Hmm?

I regards to the language-issue the link provided didn't help me, as I still can't figure out what to change and where.

To sum up:
- I have edited the language-files in order to make 'ons'(wednesday in danish) show instead of 'wed' etc. The date-info shows correctly at the frontpage, but not in category listing.
- I have looked at the code in the specific K2 item, and can't seem to grasp what to change to correct the issue.

I have uploaded two attachments this time.

One shows how events show in category-listing:
Skærmbillede 2015-05-13 kl. 12.48.53.png


The other shows the code from the K2 item:
code_k2item.png


Thanks beforehand

Best
/ Kristian
User avatar
Fresh Boarder

teitbite
Sat May 16, 2015 6:39 pm
Hi

You can see there is a "13 maj.." in the html there, so in K2 item edition change to the date format You want, what matter is this datetime="13-05-215" rest is an ordinary text.

About the date differences it may be a K2 issue related with different time set to server and database. Unfortunatelly using the later/earlier dates is the only way I know to work this around.
User avatar
Moderator

GK User
Fri Sep 11, 2015 4:12 pm
Hi,
i have same problem but I still don't understand what is the solution.

Here is an events list http://www.aregoladarteassociazione.it/ ... tiche.html and the date is shown in english; i want the italian translation. i have the correct translation of k2, i also tried to force manually the k2 english string (es. replace K2_FRI="Fri" with K2_FRI="Ven" in en-GB.com_k2 file but maybe the compontent don't take the scring from this file.

can you help me?

tnx
User avatar
Fresh Boarder

teitbite
Tue Sep 15, 2015 9:52 pm
Hi

I think it's a little different case. If You mean the date in square: "Thu Oct 15" than it's being generated with date() php function, so names are picked up directly from server. If You want this to be in Italian than server has to be configured to that as well.
User avatar
Moderator

GK User
Thu Jun 02, 2016 11:45 am
Have the same problem in Spanish. can't figure out why it works OK in the frontpage, but it does not in the category list., what is the diference between both displays?. Also in category I see when: instead of a translated option.
has to be in the code
User avatar
Fresh Boarder

GK User
Thu Jun 02, 2016 11:46 am
Or maybe the variables have a diferent name and missing in the .ini?
User avatar
Fresh Boarder

teitbite
Mon Jun 06, 2016 6:58 pm
Hi

This option is not using translation from .ini file, but a standard date() function attributes. If it's showing different language names than I believe it got overwritten in php for category already. Most probably using this function: http://php.net/manual/en/function.setlocale.php

Try using same function, but globally in /layout/default.php file.
User avatar
Moderator

GK User
Fri Jun 10, 2016 1:44 pm
teitbite wrote:Hi

I cannot see Your site, but I've just checked @JarekHM site. Please look here http://www.goksezam.pl/event/item/366-s ... erowo.html

He used a date format He needed and module displayed same used in k2 item.


OK but my problem isn't solved yet. I've got the correct daynames on the frontpage and on the event page. But if I set up 'event listings 2' on the category view - the names of days are still English (and that's why I use 'event listings1 on "wydarzenia" category list)

Here is the printscreen: https://onedrive.live.com/redir?resid=DC4A8ACA40ECAE5E!371&authkey=!AGgmhnL379-kNYc&v=3&ithint=photo%2cpng
User avatar
Fresh Boarder

teitbite
Sat Jun 11, 2016 1:42 pm
Hi

I've checked the code and here script is using function strftime() as in it's description language can be forced by using setlocale()

http://php.net/manual/pl/function.strftime.php

try add Your locale info above file /html/com_k2/templates/events_listing2/category_item.php
User avatar
Moderator

GK User
Tue Jul 12, 2016 1:36 pm
How did you manage to have days in your language ?

Thanks




JarekHM wrote:
teitbite wrote:Hi

I cannot see Your site, but I've just checked @JarekHM site. Please look here http://www.goksezam.pl/event/item/366-s ... erowo.html

He used a date format He needed and module displayed same used in k2 item.


OK but my problem isn't solved yet. I've got the correct daynames on the frontpage and on the event page. But if I set up 'event listings 2' on the category view - the names of days are still English (and that's why I use 'event listings1 on "wydarzenia" category list)

Here is the printscreen: https://onedrive.live.com/redir?resid=DC4A8ACA40ECAE5E!371&authkey=!AGgmhnL379-kNYc&v=3&ithint=photo%2cpng
User avatar
Fresh Boarder

teitbite
Fri Jul 15, 2016 5:13 pm
Hi

Names of months and days are taken from server. You may ask Your hosting provider to change location setting or try to add an override for setlocale() function in /layout/default.php

http://php.net/manual/en/function.setlocale.php
User avatar
Moderator

GK User
Tue Jul 19, 2016 6:33 pm
Hi,

Thx for your time, I don't see the point of having it this way. For instance, my web site is multilingual, Romanian and English and if i select the RO language I need to display the whole content in RO, including names of months and days. If I'll change the locale at the server side, when a user will set his language in EN he'll have names of months and days in RO :) .

Is there any work around this ? Because changing the locale at the server side is not a good ideea.

Many thanks and keep it up with this good work guys !



teitbite wrote:Hi

Names of months and days are taken from server. You may ask Your hosting provider to change location setting or try to add an override for setlocale() function in /layout/default.php

http://php.net/manual/en/function.setlocale.php
User avatar
Fresh Boarder

teitbite
Sat Jul 23, 2016 7:23 pm
Hi

First please check if setlocale() works with this issue. If it does than You can use this function to change locale dynamically after checking what language is selected. It's gonna take some time to implement the code, so I need to be sure if it's worth it, becuase it's possible Your server will overwrite this value dispite of the settings.
User avatar
Moderator

GK User
Fri Aug 05, 2016 10:39 am
Hi,

Thx for your time and suggestion but it doesn't work. What I've tried was :
Code: Select all
$currentLocale = setlocale(LC_ALL, NULL);
and
$currentLocale = setlocale(LC_ALL, 0);
under
Code: Select all
$userID = $user->get('id');
in layouts/default.php file, both of them didn't had any effect on lang selection.

I wonder isn't possible to pick up the dates in the list as it picks it up in event page?

Many thanks !
User avatar
Fresh Boarder

teitbite
Mon Aug 08, 2016 5:04 pm
Hi

I think it's not used correctly. My idea was to override server language with setlocale. Like in this example:

Code: Select all
$loc_de = setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');


where it changes lang to German. NULL option should reset lang to server default. Of course it can be forced by server even after using this function.
User avatar
Moderator

teitbite
Mon Aug 08, 2016 5:06 pm
Hi

Here is a good example of what I was going for: http://php.net/manual/en/function.strftime.php
User avatar
Moderator

GK User
Wed Sep 27, 2017 4:06 pm
Hi,
I had the same problem and couldn't get the solution.
I asked my server and they put
setlocale(LC_TIME,"it_IT");
between
<?php
and
class JConfig {
in the configuration.php

So now it looks like this:
<?php
setlocale(LC_TIME,"it_IT");
class JConfig {

My problem now is, I can't find where to translate "when: "
See image attached (blue circles):
Snapshot.jpg


I have searched a lot of language and php files with "when: " and tried to change them.
But nothing worked.

Thanks for helping!
User avatar
Junior Boarder

GK User
Wed Sep 27, 2017 5:22 pm
I would also like to eliminate the "@" and the "-" after the hours.
see attached image (blue circle):
snapshot2.jpg


I use only one day and have cancelled the "how much time left" row.

Thanks again.
User avatar
Junior Boarder

GK User
Wed Sep 27, 2017 5:52 pm
User avatar
Junior Boarder

GK User
Wed Sep 27, 2017 11:45 pm
Since the website is public and my client is working with it,
I have changed "when:" using ReReplacer component and plugin.
I would like to find a "real" solution though...
User avatar
Junior Boarder

GK User
Thu Sep 28, 2017 12:00 am
For the same reasons, I have changed also "@ -" using ReReplacer component and plugin.
Even here I would prefer to find a "real" solution though...
User avatar
Junior Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.