Download the PHP package ali-translator/text-template without Composer
On this page you can find all versions of the php package ali-translator/text-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ali-translator/text-template
More information about ali-translator/text-template
Files in ali-translator/text-template
Package text-template
Short Description Text templates
License MIT
Homepage https://sli.su/
Informations about the package text-template
Text template
Installation
This installation requires php ^7.4
Using
Functions Syntax
In our system, Functions provide a dynamic way to manipulate and format text. They utilize a syntax that closely resembles the pipe functionality in Unix-based systems, allowing for a chained or sequential application of multiple functions.
Basic Syntax:
More details about the syntax
Handlers that process Functions
Handlers are the core functionalities behind the Function Syntax. They offer the ability to manipulate text and data in various ways.
Handlers available out of the box:
-
PrintHandler : Print the value of a "static"/"plain variable". Can be used as input to another handler function.
-
HideHandler : This handler is designed to acknowledge variables without displaying them in the text. This can be useful in situations where you need to ensure that all registered variables are used in the text, even if they don't visibly appear.
-
PluralHandler : Handles pluralization based on the given parameters and locale.
-
FirstCharacterInLowercaseHandler : Changes the first character of the input string to lowercase.
-
FirstCharacterInUppercaseHandler : Transforms the first character of the given text to uppercase.
-
ChoosePrepositionBySonorityHandler (Russian) : Determines the correct preposition for the given word in Russian.
-
AddLocativeSuffixHandler (Turkish) : Appends the correct locative suffix to a given word in Turkish.
-> -
AddDirectionalSuffixHandler (Turkish) : Adds the appropriate directional suffix ("\'a", "\'e", "\'ya", "\'ye") to the given word based on vowel harmony.
->
: Without apostrophe:
-> -
ChooseQuestionSuffixHandler (Turkish) : Choose the appropriate question suffix ("mı", "mi", "mu", "mü") for the given word based on vowel harmony. Specific to the Turkish language.
results for "İstanbul" will be - ChoosePrepositionBySonorityHandler (Ukrainian)
: Determines the correct preposition for the given word in Ukrainian.
Tests
All versions of text-template with dependencies
ext-intl Version *