Template translation using Falang

More
4 years 8 months ago #6579 by samoah
samoah created the topic: Template translation using Falang
My website is multi language (English, Chinese & Arabic) and I am using Falang component to translate the content.
My problem is Falang doesn't support template translation and I need to use two different logo for each language or else change the logo position to module position so i can change it easly.
I need to find solution for this urgently.
any help is appreciated

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #6593 by marcin
marcin replied the topic: Template translation using Falang
Hello,

You can do it in the following way:

$lang = JFactory::getLanguage();
$currentlang = $lang->getTag();

if($currentlang == 'en-GB') {
<img src="logo-english.png" />
}

if($currentlang == 'ar-AA') {
<img src="logo-arabic.png" />
}

You need to be familiar with PHP to use the above code with your template.
Hope this will be helpful for you.

Regards,
Marcin

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #6601 by samoah
samoah replied the topic: Template translation using Falang
Thank you indeed for your quick response, I solved the problem by creating a new position at the top of the template (editing navbar.php file ) , then I created a custom HTML module and added the logo as picture, so now i will be able to add the Arabic logo through Falang.

Thank you again
Regards

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #6603 by marcin
marcin replied the topic: Template translation using Falang
Hello,

Nice.
Thank you for sharing your solution!

Regards,
Marcin

Please Log in or Create an account to join the conversation.

Time to create page: 0.228 seconds

INDICO S.C.

ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2019 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.