Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit eacd9a5

Browse files
authored
Merge pull request #2 from favordelivery/dev
compile constants with double quotes to allow for emoji bytes
2 parents 2615070 + e378ed7 commit eacd9a5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
langcache/*
22
!langcache/README.md
3+
.idea

i18n.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ protected function compile($config, $prefix = '') {
304304
if (is_array($value)) {
305305
$code .= $this->compile($value, $prefix . $key . $this->sectionSeperator);
306306
} else {
307-
$code .= 'const ' . $prefix . $key . ' = \'' . str_replace('\'', '\\\'', $value) . "';\n";
307+
$code .= 'const ' . $prefix . $key . ' = "' . str_replace('"', '\"', $value) . "\";\n";
308308
}
309309
}
310310
return $code;

0 commit comments

Comments
 (0)