Smart Countdown 3 module displays counter time units labels - "years", "months", "weeks", "days", etc. - along with counter values. These labels should appear in your site default language or in a current active language for multi-lingual sites. This is mostly the module translation is about. You can also translate module administration interface if you wish but it it not required for correct module display on you site front-end.

Smart Countdown module already includes a number of front-end translations: English, French, German, Italian, Russian, Spanish, Arabic and more... You can check available translations if you list contents of /modules/mod_smartcountdown3/language folder. If your site language code is not in this list or if you are using a different country standard for one of the languages listed, you will have to add translation files to the module "language" folder. Copy "en-GB" sub-folder already existing in /modules/mod_smartcountdown3/language/ and past it back to "language" folder giving it the name according to your site Joomla language code (e.g. nl-NL for Dutch). Delete "en-GB.mod_smartcountdown3.sys.ini" file from the recently created folder copy and rename "en-GB.mod_smartcountdown3.ini" file so that its name starts with your language code, e.g. to "nl-NL.mod_smartcountdown3.ini" for Dutch. Dutch translation is already included in latest module version.

Open renamed file in a text editor. Language files have to be saved as UTF-8 - No BOM, so please make sure your text editor is compatible. Look for the following lines at the end of translation file:

; Time units
MOD_SMARTCOUNTDOWN3_N_YEARS="Years"
MOD_SMARTCOUNTDOWN3_N_MONTHS="Months"
MOD_SMARTCOUNTDOWN3_N_WEEKS="Weeks"
MOD_SMARTCOUNTDOWN3_N_DAYS="Days"
MOD_SMARTCOUNTDOWN3_N_HOURS="Hours"
MOD_SMARTCOUNTDOWN3_N_MINUTES="Minutes"
MOD_SMARTCOUNTDOWN3_N_SECONDS="Seconds"
MOD_SMARTCOUNTDOWN3_N_YEARS_1="Year"
MOD_SMARTCOUNTDOWN3_N_MONTHS_1="Month"
MOD_SMARTCOUNTDOWN3_N_WEEKS_1="Week"
MOD_SMARTCOUNTDOWN3_N_DAYS_1="Day"
MOD_SMARTCOUNTDOWN3_N_HOURS_1="Hour"
MOD_SMARTCOUNTDOWN3_N_MINUTES_1="Minute"
MOD_SMARTCOUNTDOWN3_N_SECONDS_1="Second"

Replace the terms in quotes with correct expressions in your language and save the file. If your language has 2 plural forms (singular / plural) that's all about it - you are done. For more complex cases continue reading.

Suport for multiple plural forms

If your language has more than 2 plural forms (e.g. Russian) you have to add lines for each additional plural form:

MOD_SMARTCOUNTDOWN3_N_YEARS_2="Года"
MOD_SMARTCOUNTDOWN3_N_MONTHS_2="Месяца"
MOD_SMARTCOUNTDOWN3_N_WEEKS_2="Недели"
MOD_SMARTCOUNTDOWN3_N_DAYS_2="Дня"
MOD_SMARTCOUNTDOWN3_N_HOURS_2="Часа"
MOD_SMARTCOUNTDOWN3_N_MINUTES_2="Минуты"
MOD_SMARTCOUNTDOWN3_N_SECONDS_2="Секунды"

(this is only an example, Russian translation is already included in module package)

Smart Countdown calculates correct label plural forms on the fly and relies on a special client script (javascript) function. If your language uses a custom algorithm for getting plural forms you will have to add php + js files pair to the module's "/helpers/plurals" sub-folder. Refer to "russian" implementation as a sample:

plural_ru-ru.php

// no direct access
defined('_JEXEC') or die;
require_once dirname(__FILE__).'/plural_base.php';
function scdSetupTranslatedPlurals()
{
return modSmartCountdown3Plurals::setupTranslatedLabels('ru-ru' /* client script file to add */, 3 /* number of plural forms */);
}

plural_ru-ru.js

/*
Return correct suffix (may be empty) for the plural form of n
*/
function smartcountdown_plural(n) {
var rest10 = n % 10;
var rest100 = n % 100;
if(rest10 == 1 && rest100 != 11) {
return '_1';
} else if(rest10 >=2 && rest10 <= 4 && (rest100 < 10 || rest100 >= 20)) {
return '_2';
} else {
return '';
}
}

Make sure that filenames start with "plural_", followed by lowercase version of related language tag ("ru-ru" instead of "ru-RU"). Search the internet for the right algorithm for your language.