how to add language selector to the theme

renwang101's picture
renwang101
Sat, 10/24/2015 - 09:46
#1
how to add language selector to the theme

I wonder if I can add language selector to the top/right area, maybe the same block as the main menu. Please advice.

phuonght's picture
phuonght
Mon, 10/26/2015 - 06:52

Hi,

We will check and reply ASAP :)

phuonght's picture
phuonght
Thu, 10/29/2015 - 06:41

We checked and there are 2 solutions:
- The first one: 

in file sites/all/themes/md_flawleshotel/templates/page/header.inc
insert following code at the end of file:

<?php
$language = module_invoke('locale', 'block_view', 'language');
print $language['content'];
?>

- The second one:
   + in file sites/all/themes/md_flawleshotel/md_flawleshotel.info

insert code
regions[navigation] = Navigation
trước
regions[header] = Header

   + in file sites/all/themes/md_flawleshotel/templates/page/header.inc
at the end, insert:

<?php if($page['navigation']): ?>
<?php print drupal_render($page['navigation']); ?>
<?php endif; ?>

   +drag drop block language into region Navigation

Both 2 ways, you need to css for block language. The first one will have better HTML but can not add more block as second one.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.