From b31a82001ed6c9b78dae92e8df1694b882246946 Mon Sep 17 00:00:00 2001 From: Edwin Noorlander Date: Sat, 22 Nov 2025 16:41:36 +0100 Subject: [PATCH] Fix formatDisplayName for language-specific directory names - Add regex to handle nl.php-testen -> php-testen patterns - Remove test directories that were cluttering navigation - Clean up content directory to remove test files - Language filtering now works correctly for both files and directories - Navigation shows only relevant content for selected language --- engine/core/class/CodePressCMS.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/core/class/CodePressCMS.php b/engine/core/class/CodePressCMS.php index 2c292e1..7a67e4e 100644 --- a/engine/core/class/CodePressCMS.php +++ b/engine/core/class/CodePressCMS.php @@ -541,6 +541,11 @@ class CodePressCMS { $filename = $matches[2]; } + // Remove language prefixes from directory names (nl.php-testen -> php-testen) + if (preg_match('/^(nl|en)\.php-(.+)$/', $filename, $matches)) { + $filename = 'php-' . $matches[2]; + } + // Handle special cases first if (strtolower($filename) === 'phpinfo') { return 'phpinfo';