I've got installed D7 with 'i18n' module and all the Alpine parts for that great theme working perfectly except the Main Top Menu, i.e. 'Primary Links' to output translated version.

So, let me know, please, on how this peace of code needs to be reviewed for to make 'Primary Links' by Multi-language fully functional:

<div id="nav">
    <?php if ($main_menu): ?>
      <div id="primary-menu">
        <?php print $main_menu_tree; ?>
      </div><!-- /primary links menu -->
    <?php endif; ?>
</div>

I appreciate you a lot for your time and effort creating this great theme.

Comments

jointxs’s picture

Assigned: jointxs » Unassigned
sk33lz’s picture

Hi,

I will see if there are any specific requirements needed for the i18n module to output translated text in the menu.

Thanks for using the theme and posting this issue. Hopefully I will have an answer for you soon.

Jason

irishdan’s picture

hey

this code from the bartik theme those the trick.

    <?php print theme('links__system_main_menu', array(
          'links' => $main_menu,
          'attributes' => array(
            'id' => 'main-menu-links',
            'class' => array('links', 'clearfix'),
          ),
          'heading' => array(
            'text' => t('Main menu'),
            'level' => 'h2',
            'class' => array('element-invisible'),
          ),
        )); ?>
sk33lz’s picture

Ok, so it seems that because I am using the $main_menu_tree variable to build out my navigation dropdowns instead of the $main_menu variable, i18n is not able to translate it by default. I found an article that sheds a little light on the situation, http://evolvingweb.ca/story/drupal-7-multilingual-whats-new-i18n.

According to the article, there is now a setting in the i18n module that will allow you to set which variables get internationalized right within the Drupal UI.

I would rather not break the dropdown functionality in my theme if the i18n module can handle my variable also. Please see if this works on your site.

Thanks!

Jason

sk33lz’s picture

Assigned: Unassigned » sk33lz
Status: Active » Closed (works as designed)

I have not heard back from the op if the solution above worked or not, but it is the best solution I have found without butchering my theme.

No others have posted issues about this and I believe the solution lies in my previous post by adding the variable I use within i18n the module.

I do not use the default $main_menu variable in my theme, I am using a variable called $main_menu_tree, which builds out the CSS only dropdowns in the theme.

I am closing this issue due to inactivity and since a viable solution has been added to the i18n module itself to fix the problem the op was having.