Skip to main content
replaced http://craftcms.stackexchange.com/ with https://craftcms.stackexchange.com/
Source Link

It looks like you need Craft Pro and even then it's not possible to have the CP in a language that is not installed as a front-end locale.

The (new) defaultCpLanguage setting doesn't change this. See Brad's answers here:
Change system languageChange system language +
German locale & English CP language resulting in disappeared entriesGerman locale & English CP language resulting in disappeared entries

But to help you with your date problem. It is possible to access most data from craft/app/framework/i18n/data/ via craft.i18n methods.

{% macro dateFormat(date, locale) %}
    {% set localeData = craft.i18n.getLocaleData(locale|default('de')) %}
    {{
        localeData.getWeekdayName(date|date('w')) ~ ', ' ~
        date|date('j ') ~
        localeData.getMonthName(date|date('m')) ~
        date|date(' Y')
    }}
{% endmacro %}
{% import _self as macros %}

{% for locale in ['en', 'es', 'fr', 'de', 'ru', 'nl', 'no'] %}
    <li>{{ macros.dateFormat(now, locale) }}</li> 
{% endfor %}

It looks like you need Craft Pro and even then it's not possible to have the CP in a language that is not installed as a front-end locale.

The (new) defaultCpLanguage setting doesn't change this. See Brad's answers here:
Change system language +
German locale & English CP language resulting in disappeared entries

But to help you with your date problem. It is possible to access most data from craft/app/framework/i18n/data/ via craft.i18n methods.

{% macro dateFormat(date, locale) %}
    {% set localeData = craft.i18n.getLocaleData(locale|default('de')) %}
    {{
        localeData.getWeekdayName(date|date('w')) ~ ', ' ~
        date|date('j ') ~
        localeData.getMonthName(date|date('m')) ~
        date|date(' Y')
    }}
{% endmacro %}
{% import _self as macros %}

{% for locale in ['en', 'es', 'fr', 'de', 'ru', 'nl', 'no'] %}
    <li>{{ macros.dateFormat(now, locale) }}</li> 
{% endfor %}

It looks like you need Craft Pro and even then it's not possible to have the CP in a language that is not installed as a front-end locale.

The (new) defaultCpLanguage setting doesn't change this. See Brad's answers here:
Change system language +
German locale & English CP language resulting in disappeared entries

But to help you with your date problem. It is possible to access most data from craft/app/framework/i18n/data/ via craft.i18n methods.

{% macro dateFormat(date, locale) %}
    {% set localeData = craft.i18n.getLocaleData(locale|default('de')) %}
    {{
        localeData.getWeekdayName(date|date('w')) ~ ', ' ~
        date|date('j ') ~
        localeData.getMonthName(date|date('m')) ~
        date|date(' Y')
    }}
{% endmacro %}
{% import _self as macros %}

{% for locale in ['en', 'es', 'fr', 'de', 'ru', 'nl', 'no'] %}
    <li>{{ macros.dateFormat(now, locale) }}</li> 
{% endfor %}
Source Link
carlcs
  • 36.3k
  • 5
  • 63
  • 140

It looks like you need Craft Pro and even then it's not possible to have the CP in a language that is not installed as a front-end locale.

The (new) defaultCpLanguage setting doesn't change this. See Brad's answers here:
Change system language +
German locale & English CP language resulting in disappeared entries

But to help you with your date problem. It is possible to access most data from craft/app/framework/i18n/data/ via craft.i18n methods.

{% macro dateFormat(date, locale) %}
    {% set localeData = craft.i18n.getLocaleData(locale|default('de')) %}
    {{
        localeData.getWeekdayName(date|date('w')) ~ ', ' ~
        date|date('j ') ~
        localeData.getMonthName(date|date('m')) ~
        date|date(' Y')
    }}
{% endmacro %}
{% import _self as macros %}

{% for locale in ['en', 'es', 'fr', 'de', 'ru', 'nl', 'no'] %}
    <li>{{ macros.dateFormat(now, locale) }}</li> 
{% endfor %}