S
Returns an empty space character.
This constant returns a standard zero-width non-joiner character.
You can use this constant as an alternative to the P
constant. This character is invisible because it has a width
of 0
pixels. Use this character if you don’t want to get rid of it at the end of string data processing. Useful to
prevent data from being translated by function i()
, by inserting dummy S
character between the text
that will go into function i()
.
In the example below, if $page->title
value is “Windows”, the text below may be translated to “Jendela” by
Language extension when your language preference is set to Indonesian. Whereas you don’t
want it to be translated because you are referring “Windows” to the trademark of an operating system, not to the literal
meaning of it.
<h2>
<?= i($page->title); ?>
</h2>
To prevent the text from being translated by function i()
, you can surround it with S
constant. 1
<h2>
<?= i(S . $page->title . S); ?>
</h2>
See Also
-
Unless you have a special translation preference where the translation key is the exact phrase of
S . 'Windows' . S
. This should happen very rarely because I never recommend adding non-ASCII characters into the translation key. ↩
D
Returns the directory separator.
ENGINE
Returns the engine folder path.
LOT
Returns the lot folder path.
N
Returns the line ending character of current operating system.
P
Returns a placeholder character.
PATH
Returns the application root path without the trailing directory separator.
S
Returns an empty space character.
TEST
Disables or enables test mode.
VERSION
Returns the current application version.