Introduction - Logaty

Introduction Last updated: 26/12/2021

LOGATY is a PHP Library which can help you rapidly develop your next Multilingual Website.
It can be used for CMS, Companies Site's, Personal site's, frameworks, etc.It has a lot of useful
components to reduce the burden of create a Multilingual website for your next website.

It's based on PHP Language and contains a lot of Functions to easily make your interactive Website.

Github Repository:

Find Logaty Source Code in github

Quick Start

Start Using LOGATY. It won't take more than 5 minutes to start. Read the step-by-step guide.

  • Create Translation Files

    inside LOGATY directory go to -local/languages- directory
    & create files looks like figure.

  • Set Translation

    return array from each files (home.php)

     return [ 'translation-key' => 'translation' ];
    

    <?php
    /**
        en/home.php
    */
        return [
            'welcome' => 'Welcome in Logaty Homepage'
        ];
    ?>
    
    <?php
    /**
        ar/home.php
    */
        return [
            'welcome' => 'مرحبا بك في الصفحة الرئيسية للغاتي'
        ];
    ?>
    
  • Get Translation

    return translation as selected language or as language parameter you send

    <?php
        // as selected language
        /* 1 */ echo logaty()->_x('home.welcome');
        /* 2 echo directly */ logaty()->__('home.welcome');
    
        // as given language parameter
        /* 1 */ echo logaty()->_x('home.welcome', 'ar');
        /* 2 echo directly */ logaty()->__('home.welcome', 'en');
    
    ?>
    

Need a Help ?

feel free to contact me on < m.anzawi2013@gmail.com >

Fork On Github

Fork LOGATY Library on Github and help me to develop something awesome