Laravel Idea for PhpStorm - Full-featured IDE for productive artisans!

LangCountry launches v4

Published on by

LangCountry launches v4 image

Laravel LangCountry just launched version 4. If you are not familiar with the package here is what it does:

Laravel has great localisation functionality, but it is all based on the locale. The locale only refers to a language, not a country. This package adds the ability to localize based on the country. Why? Mainly because dates dates can be pronounced the same in a language, but be formatted differently in different countries. The package also adds more convenience functions to get localized country names, currency symbols and more.

Veresion 4 now includes adding Carbon Macros so you can use the LangCountry formatting directly on your Carbon instances. On most IDE's they're also autocompleted for convenience.

Examples:

session(['lang_country' => 'nl-NL']);
$post->created_at->langCountryDateNumbers(); // Will return "27-09-2023"
 
// You can also include the time by adding `true` as the second parameter.
$post->created_at->langCountryDateWordsWithDay(false, true); // Will return "Wednesday September 27th 2023 01:05 pm"

For more information check out our original write up on Laravel LangCountry and visit the official docs.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Filed in:
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB

The latest

View all →
LangCountry launches v4 image

LangCountry launches v4

Read article
Take your Inertia.js skills to the next level image

Take your Inertia.js skills to the next level

Read article
PHP and LLMs with Alfred Nutile image

PHP and LLMs with Alfred Nutile

Read article
PHP 8.4 Release Candidate 1 is here image

PHP 8.4 Release Candidate 1 is here

Read article
Laravel Config Checker Package image

Laravel Config Checker Package

Read article
Laravel 11.24 Released image

Laravel 11.24 Released

Read article