Post by jorem » Mon May 03, 2021 3:06 pm

OC 3.0.3.7, standard theme..

Shop set to English (admin) and Swedish (front). The front html lang is "se" (Swedish). Have option "Date & Time" for products.

When user is trying to select date, the calendar shows a strange language, neither Swedish nor English. Like now, the calendar name for month May is "Miessermánnu".

Have emptied caches. I have no idea how or where to make the calendar show Swedish language. Anyone?
Last edited by jorem on Mon May 03, 2021 5:22 pm, edited 1 time in total.

Danne
----------------------------
https://proformica.com


Active Member

Posts

Joined
Thu Oct 07, 2010 9:42 pm

Post by xxvirusxx » Mon May 03, 2021 3:27 pm

Open all Swedish languages files and search for Miessermánnu

My converted modules | Buy me a beer | Opencart upgrade service


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by jorem » Mon May 03, 2021 4:58 pm

xxvirusxx wrote:
Mon May 03, 2021 3:27 pm
Open all Swedish languages files and search for Miessermánnu
Heh? No. The word doesn't exist in any OC-file or in the database. It's as if the plug selects language based on IP or any other setting. But I have gone through all localization and language options and set all to English. I even launched my VPN and logged in with IP:s from e.g. USA. Still these weird (Icelandic?) names for days and months.

Thought that perhaps the delivery date option would show proper names, but no. Shows the same.
Last edited by jorem on Mon May 03, 2021 5:23 pm, edited 1 time in total.

Danne
----------------------------
https://proformica.com


Active Member

Posts

Joined
Thu Oct 07, 2010 9:42 pm

Post by OSWorX » Mon May 03, 2021 5:16 pm

Had a quick look at this website.
Deside your troubles, please check asap the colors of the timepicker element - horrible and not able to read!
Second: fix the javascript errors.
And third: the wording is from the timepicker language file ..

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by jorem » Mon May 03, 2021 5:21 pm

OSWorX wrote:
Mon May 03, 2021 5:16 pm
Had a quick look at this website.
Deside your troubles, please check asap the colors of the timepicker element - horrible and not able to read!
Second: fix the javascript errors.
And third: the wording is from the timepicker language file ..
Thanks! Found the mistake while you were replying. Had selected "se" as language as I assumed it was Swedish (as it usually is). Turns out it was wrong. When I changed to "sw" in catalog/language/en-gb/en-gb.php it shows correct. All good now. Thanks for helping out!

Danne
----------------------------
https://proformica.com


Active Member

Posts

Joined
Thu Oct 07, 2010 9:42 pm

Post by OSWorX » Mon May 03, 2021 6:11 pm

Why en-gb.php ?
Don't you use a swedish translation?

Beside this, the English original file should be always intact and not edited.
Why?
Because en-gb is used as fallback when for example an extension does not have a Swedish translation (which I guess almost all will not have).
So you should have en-gb as original and sv-sv as translation (where you can adopt whatever you want).

Because sv (for Sverige) is the correct code .. see: https://www.iso.org/obp/ui/#iso:code:3166:SE
And sv is also used inside the moment locales:

Code: Select all

months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
    monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
    weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
    weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
    weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),
bootstrap datetimepicker sv locale:

Code: Select all

$.fn.datepicker.dates['sv'] = {
		days: ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"],
		daysShort: ["sön", "mån", "tis", "ons", "tor", "fre", "lör"],
		daysMin: ["sö", "må", "ti", "on", "to", "fr", "lö"],
		months: ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"],
		monthsShort: ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"],
		today: "Idag",
		format: "yyyy-mm-dd",
		weekStart: 1,
		clear: "Rensa"
	};
see: https://github.com/uxsolutions/bootstra ... cker.sv.js

sw stands for Swahili

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by jorem » Tue May 04, 2021 4:02 am

OSWorX wrote:
Mon May 03, 2021 6:11 pm
Why en-gb.php ?
Don't you use a swedish translation

sw stands for Swahili
No, I don't use any specific Swedish translation. Changing in en-gb instead since I get the translations I need. Fallback to actual en-gb is irrelevant in this case.
I tried "se" which turned out to be the language used by Lapponians in northern Sweden, Norway and Finland. Changed to "sv" (I mistakenly wrote "sw" previously) and it just fine.

However, curious about your comment "Deside your troubles, please check asap the colors of the timepicker element - horrible and not able to read!
Second: fix the javascript errors."

Can you please elaborate?

Danne
----------------------------
https://proformica.com


Active Member

Posts

Joined
Thu Oct 07, 2010 9:42 pm

Post by OSWorX » Tue May 04, 2021 1:45 pm

jorem wrote:
Tue May 04, 2021 4:02 am
However, curious about your comment "Deside your troubles, please check asap the colors of the timepicker element - horrible and not able to read!
Second: fix the javascript errors."

Can you please elaborate?
Should be "Beside" not "Decide" - my fault.
And because you have deleted the URL I am not able to visit the site again.
But when I was there, a few javascript errors were visible and the color of the datepicker items horrible.
When you visit your site with open developer console (Browser & F12) you should see them as well (when not fixed already).

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 7 guests