Polish months in date formatting
date, internationalization, php
Solution
You need two arrays:
$m_en = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
$m_pol = array("Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec");
all you have to do now is:
$workoutSlug = str_replace($m_en, $m_pol, $input);
Input is you input you wish to translate.
Problem
The beautiful Polish language uses different grammar for the name of the months when saying things like "March 2013" (without day) vs. "March 17 2013" (with day). Using PHP's `strftime()` with `%B` gives the correct name of the month for the without-day-case. How can I properly write the date in the with-day-case? Do I have to code something myself or is there already some support for such cases?