Reply To: Countdown translation


Hello Ivan,

Realy sorry about the delayed support these days. We had some major problems.

May be your replies were marked as spam, but I don’t see them blocked in our system. I can see them posted yesterday.

As I already explained, you can’t translate them via Loco Translate or any other plugin. These are automatically translated based on the system locale. (system locale is the system language code).

Your system locale is set to sr-RS instead of sr-SR and the countdown can’t detect the language. I don’t know if you’re using the official Serbian translation of WordPress or a custom one, but the official Serbian system locale must be sr-SR. In your system the last two characters are somehow reversed.

I don’t know why it’s like that, so I can’t really tell how to fix it.

You can try the followng “fix”.

Navigate to the theme folder – zass/js/count and make a copy of the file jquery.countdown-sr-SR.js

Than, rename that file to jquery.countdown-sr-RS.js

Open the file with code editor (or Notepad) and you’d see the following code:

(function($) {
	$.countdown.regionalOptions['sr-SR'] = {
		labels: ['Godina', 'Meseci', 'Nedelja', 'Dana', 'Časova', 'Minuta', 'Sekundi'],
		labels1: ['Godina', 'Mesec', 'Nedelja', 'Dan', 'Čas', 'Minut', 'Sekunda'],
		labels2: ['Godine', 'Meseca', 'Nedelje', 'Dana', 'Časa', 'Minuta', 'Sekunde'],
		compactLabels: ['g', 'm', 'n', 'd'],
		whichLabels: function(amount) {
			return (amount == 1 ? 1 : (amount >= 2 && amount <= 4 ? 2 : 0));
		digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
		timeSeparator: ':', isRTL: false};

Change the locale there from sr-SR to sr-RS, so it would match your system locale. Using this approach, it’d work with future updates even if the system locale changes to the correct one.

Hope this helps.