මචං මෙහෙමයි.
1 හදන්නන Folder එකක් my_app කියල.
2 ඒකෙ ඇතුලෙ තියෙනව index.php කියල file එකක්. ඒකෙ content එක තියෙන්නේ මෙහෙමයි.
3 දැන් ඔය my_app කියන Folder එක ඇතුලට ගිහින් මෙන්න මේ Composer package එක Install කරන්න.
composer require symfony/translation මේකෙ docs https://symfony.com/doc/current/translation.html#installation
දැන් මට කියල දියන් මචං ඔය index.php එක ඇතුලෙ තියෙන hello machan 01 සහ hello machan 02 කියන text strings ඔය Install කරපු package එක යූස් කරල translate support කරන විදියට හදාගන්න.
මේක php වල namespaces, interfaces ගැන දන්න කෙනෙක්ට පට්ට ලේසියෙන් කරන්න පුලුවන්.
1 හදන්නන Folder එකක් my_app කියල.
2 ඒකෙ ඇතුලෙ තියෙනව index.php කියල file එකක්. ඒකෙ content එක තියෙන්නේ මෙහෙමයි.
PHP:
<?php
echo 'hello machan 01';
?>
<p>hello machan 02</p>
3 දැන් ඔය my_app කියන Folder එක ඇතුලට ගිහින් මෙන්න මේ Composer package එක Install කරන්න.
composer require symfony/translation මේකෙ docs https://symfony.com/doc/current/translation.html#installation
දැන් මට කියල දියන් මචං ඔය index.php එක ඇතුලෙ තියෙන hello machan 01 සහ hello machan 02 කියන text strings ඔය Install කරපු package එක යූස් කරල translate support කරන විදියට හදාගන්න.
මේක php වල namespaces, interfaces ගැන දන්න කෙනෙක්ට පට්ට ලේසියෙන් කරන්න පුලුවන්.




