Link Class Init

Link Methods

Function


echo logatyLink($uri, $language = "");
                    
                    

$link : (Optional) the link you want to generate (or slug) .
$lang : (Optional) the language for generated link.

IF $uri parameter not sent (send empty string) that create link to same page
IF $language parameter not sent that create link to current language



Object Oriented Programming (OOP)



echo Link::create($uri, $language = "");
                    
                    

$link : (Optional) the link you want to generate (or slug) .
$lang : (Optional) the language for generated link.

IF $uri parameter not sent (send empty string) that create link to same page
IF $language parameter not sent that create link to current language

Generate URL's

Generate URL's

2 method with multi functionality

Function



logatyLink("slug", "en")
                

How to Use

Generate Link to same Page with other language


<a href="<?php echo logatyLink('', $language_code) ?>">My Link</a>

// real example

<a href="<?php echo logatyLink('', 'en') ?>">this page in english language</a>
                


Generate Link to other Page with selected language


<a href="<?php echo logatyLink('my_link') ?>"> <?php __("My Link")?></a>

// real example

<a href="<?php echo logatyLink('/about_me') ?>"><?php __("Go to About me Page in selected Language")?><
                    /a>
                


Generate Link to other Page with other language


<a href="<?php echo logatyLink('my_link', $language_code) ?>"> <?php __("My Link")?></a>

// real example

<a href="<?php echo logatyLink('/about_me', 'ar') ?>"><?php __("Go to About me Page in Arabic Language")
                    ?></a>
                



OOP

Generate Link to same Page with other language


<a href="<?php echo Link::create('', $language_code) ?>">My Link</a>

// real example

<a href="<?php echo Link::create('', 'en') ?>">this page in english language</a>
                


Generate Link to other Page with selected language


<a href="<?php echo Link::create('my_link') ?>"> <?php __("My Link")?></a>

// real example

<a href="<?php echo Link::create('/about_me') ?>"><?php __("Go to About me Page in selected Language")?></a>
                


Generate Link to other Page with other language


<a href="<?php echo Link::create('my_link', $language_code) ?>"> <?php __("My Link")?></a>

// real example

<a href="<?php echo Link::create('/about_me', 'ar') ?>"><?php __("Go to About me Page in Arabic Language")?></a>