CHunky Universe of Vigourous Astonishing SHarepoint :)

jQuery timeago and the localization

jQuery timeagoIf you have used SPUtility.TimeDeltaAsString you must know how useful it is. There is also the jQuery plugin that can perform counting of time deltas and (!) translate it. jQuery timeago is available for many languages, Swedish among others:

// Swedish
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"

The code is hosted on Github. In order the time deltas to be localized in SharePoint a ScriptLink has to be used:

   ID="timeagoLanguage" runat="server"
   OnDemand="False" ></SharePoint:ScriptLink>

Save the Swedish translation in jquery.timeago.lang.js in mapped folder layouts, in 1053.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Daniel Chronlund Cloud Tech Blog

News, tips and thoughts for Microsoft cloud fans

Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Architect, Speaker, Author

Microsoft 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Mai Omar Desouki

PFE @ Microsoft

Cameron Dwyer

Office 365, SharePoint, Azure, OnePlace Solutions & Life's Other Little Wonders


Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

Aryan Nava

DevOps, Cloud and Blockchain Consultant


SharePoint for everyone


Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint


Mostly what I know and share about...

%d bloggers like this: