omz13 / kirby3-xmlsitemap

kirby3 plugin to generate an xml-based sitemap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined constant 'LC_MESSAGES'

mynameisfreedom opened this issue · comments

Hello, I am getting Undefined constant 'LC_MESSAGES' error message on sitemap.xml page.
My development system is Windows, and I have multilanguage Kirby CMS installation.

screenshot-localhost-2019 08 07-12-49-02

I had the same issue while running Apache on Windows using XAMPP. The error seems to be related to this specific environment, as the sitemap works well on Ubuntu-Apache server and CentOS7-Nginx.

The manual suggests that this constant may not be available with all PHP compilations:

LC_MESSAGES for system responses (available if PHP was compiled with libintl)

As a workaround for a local development environment, you can always define this constant yourself. I'm using the following code snippet in my Kirby configuration file for development environment:

if (!defined('LC_MESSAGES')) {
    define('LC_MESSAGES', 5);
}

Hello, @jpsjanne thank you very much for answering and for the workaround. In the meanwhile, I figured out that it is related to the Windows environment, but couldn't make a workaround.