-
-
Save gravis/68620 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can represent time statements in most western languages where | |
a prefix and/or suffix is used. | |
The default case is to use suffix only (as in English), which you | |
do by providing the `suffixAgo` and `suffixFromNow` settings in | |
the strings hash (earlier versions of timeago used the deprecated | |
`ago` and `fromNow` options). If present, they are used. | |
2 minutes [suffixAgo] | |
2 minutes [suffixFromNow] | |
In case you want to use prefix only instead of | |
suffix (e.g. Greek), you provide the `prefixAgo` and | |
`prefixFromNow` options in the strings hash and leave `suffixAgo` | |
and `suffixFromNow` empty or null. | |
[prefixAgo] 2 minutes | |
[prefixFromNow] 2 minutes | |
For languages where you want to use a prefix only for future | |
tense and prefix/suffix for past tense (for example swedish), you | |
can combine the prefix and suffixes as needed. | |
[prefixAgo] 2 minutes [suffixAgo] | |
[prefixFromNow] 2 minutes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.timeago.settings.strings = { | |
suffixAgo: "geleden", | |
suffixFromNow: "vanaf nu", | |
seconds: "iets minder dan een minute", | |
minute: "ongeveer een minuut", | |
minutes: "%d minuten", | |
hour: "ongeveer een uur", | |
hours: "ongeveer %d uren", | |
day: "een dag", | |
days: "%d dagen", | |
month: "ongeveer een maand", | |
months: "%d maanden", | |
year: "ongeveer een jaar", | |
years: "%d jaar" | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.timeago.settings.strings = { | |
prefixAgo: "il y a", | |
prefixFromNow: "dans", | |
suffixAgo: null, | |
suffixFromNow: null, | |
seconds: "moins d'une minute", | |
minute: "environ une minute", | |
minutes: "%d minutes", | |
hour: "environ une heure", | |
hours: "environ %d heures", | |
day: "un jour", | |
days: "%d jours", | |
month: "environ un mois", | |
months: "%d mois", | |
year: "environ un an", | |
years: "%d années" | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.timeago.settings.strings = { | |
prefixAgo: "πριν", | |
prefixFromNow: "σε", | |
suffixAgo: "", | |
suffixFromNow: "", | |
seconds: "λιγότερο από ένα λεπτό", | |
minute: "περίπου ένα λεπτό", | |
minutes: "%d λεπτά", | |
hour: "περίπου μία ώρα", | |
hours: "περίπου %d ώρες", | |
day: "μία μέρα", | |
days: "%d μέρες", | |
month: "περίπου ένα μήνα", | |
months: "%d μήνες", | |
year: "περίπου ένα χρόνο", | |
years: "%d χρόνια" | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.timeago.settings.strings = { | |
prefixAgo: null, | |
prefixFromNow: null, | |
suffixAgo: null, | |
suffixFromNow: null, | |
seconds: "kevesebb mint egy perce", | |
minute: "körülbelül egy perce", | |
minutes: "%d perce", | |
hour: "körülbelül egy órája", | |
hours: "körülbelül %d órája", | |
day: "körülbelül egy napja", | |
days: "%d napja", | |
month: "körülbelül egy hónapja", | |
months: "%d hónapja", | |
year: "körülbelül egy éve", | |
years: "%d éve" | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.timeago.settings.strings = { | |
suffixAgo: "atrás", | |
suffixFromNow: "a partir de agora", | |
seconds: "menos de um minuto", | |
minute: "cerca de um minuto", | |
minutes: "%d minutos", | |
hour: "cerca de uma hora", | |
hours: "cerca de %d horas", | |
day: "um dia", | |
days: "%d dias", | |
month: "cerca de um mês", | |
months: "%d meses", | |
year: "cerca de um ano", | |
years: "%d anos" | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
function numpf(n, f, s, t) { | |
// f - 1, 21, 31, ... | |
// s - 2-4, 22-24, 32-34 ... | |
// t - 5-20, 25-30, ... | |
var n10 = n % 10; | |
if ( (n10 == 1) && ( (n == 1) || (n > 20) ) ) { | |
return f; | |
} else if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) { | |
return s; | |
} else { | |
return t; | |
} | |
} | |
jQuery.timeago.settings.strings = { | |
prefixAgo: null, | |
prefixFromNow: "через", | |
suffixAgo: "назад", | |
suffixFromNow: null, | |
seconds: "меньше минуты", | |
minute: "минуту", | |
minutes: function(value) { return numpf(value, "%d минута", "%d минуты", "%d минут"); }, | |
hour: "час", | |
hours: function(value) { return numpf(value, "%d час", "%d часа", "%d часов"); }, | |
day: "день", | |
days: function(value) { return numpf(value, "%d день", "%d дня", "%d дней"); }, | |
month: "месяц", | |
months: function(value) { return numpf(value, "%d месяц", "%d месяца", "%d месяцев"); }, | |
year: "год", | |
years: function(value) { return numpf(value, "%d год", "%d года", "%d лет"); } | |
}; | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.timeago.settings.strings = { | |
suffixAgo: "apenas un momento atrás", | |
suffixFromNow: "a partir de ahora", | |
seconds: "menos de um minuto", | |
minute: "cerca de um minuto atrás", | |
minutes: "hace unos %d minutos atrás", | |
hour: "cerca de una hora", | |
hours: "cerca de %d horas", | |
day: "un día", | |
days: "%d días", | |
month: "hace un mes atrás", | |
months: "hace %d meses", | |
year: "hace un año atrás", | |
years: "hace %d años atrás" | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.timeago.settings.strings = { | |
prefixAgo: "för", | |
prefixFromNow: "om", | |
suffixAgo: "sedan", | |
suffixFromNow: "", | |
seconds: "mindre än en minut", | |
minute: "ungefär en minut", | |
minutes: "%d minuter", | |
hour: "ungefär en timme", | |
hours: "ungefär %d timmar", | |
day: "en dag", | |
days: "%d dagar", | |
month: "ungefär en månad", | |
months: "%d månader", | |
year: "ungefär ett år", | |
years: "%d år" | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment