Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
jekyll-date-localization
Advanced tools
Jekyll plugin for for custom locale date formatting
Jekyll Date Localization is a liquid filter plugin for formatting a date with a custom locale. The idea is based on jekyll-i18n-date however this package provides a gem-based plugin with a couple of locales already included for ease of use.
This is a simple plugin only for localizing dates, for larger scale translation capabilities check this list of plugins.
This plugin is available as a RubyGem.
There are a few ways to install the plugin (docs), e.g. by adding this line to your application's Gemfile
:
gem 'jekyll-date-localization', group: :jekyll_plugins
And then execute the bundle
command to install the gem.
You can configure the default locale in your config.yml
file:
date_locale: cs
In your markup, simply use the localize
liquid filter made available through this plugin:
{{ page.date | localize: '%d. %B %Y' }}
By default the value of date_locale
is used to select the language. Alternatively you can also directly specify the language:
{{ page.date | localize: '%d. %B %Y', 'fr' }}
For details about the formatting string, see strftime documentation. The localized entries are %b %B %a %A
.
There are a couple of built-in languages in this repository in the lib/locales directory. If you want to add your own language file or override one of the included languages, create a new *.yml
language definition file and put it in the _locales
directory of your project.
Feel free to send PRs with additional languages or improvements.
Copyright (c) 2022 Tomas Krupka
License: MIT
FAQs
Unknown package
We found that jekyll-date-localization demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.