site using modified version of Acquia Slate

Events happening in the community are now at Drupal community events on www.drupal.org.
citronica's picture

Hi,

I recently built a small multi-lingual site using Acquia Slate and thought I'd post it here. I changed the color scheme and also added some rudimentary RTL support:

http://globalfamilyproject.org/

Many thanks to Acquia and the TNT team for releasing such a great theme!

Best wishes,
Andrea

Comments

Nice site

eyalb's picture

you forgot the logo on the hebrew page...

I didn't forget it... I just

citronica's picture

I didn't forget it... I just couldn't get it to display correctly in right-to-left format, and it wasn't important enough to fix on my tight deadline :-)

Language negotiation

sunilkumar's picture

Can you please explain how did you do that multilingual part? The language negotiation used, domain, path auto settings in detail.

I am looking for a similar thing.

Regards,
-S-

i18n

citronica's picture

Thanks for asking -- I should probably write it all down before I forget what I did. This is not going to be an exhaustive set of instructions for implementing Drupal i18n (internationalization), but just an overview of my settings.

First, here are the modules I enabled:

  • Locale (Drupal core)
  • Internationalization, specifically:
    • Block Translation
    • Content Type Translation
    • Internationalization
    • String Translation
    • Synchronize Translation (not sure I'm actually using this one)
    • Taxonomy Translations (I could probably disable this one too)
  • Language Icons
  • Menu Block - I don't know if this was the only solution to the problem, but I used this module to duplicate the Primary Links menu in different languages, for placement on the front page in the Front Preface Sidebar block. I created a Hebrew version of the block, and then configured it only to appear on the Hebrew front page, and so on.

My settings are as follows:

Site configuration > Languages (/admin/settings/language/configure/language)

  • Language negotiation: Path prefix with language fallback.
  • I set the prefixes on the individual language pages (e.g. admin/settings/language/edit/en), and I opted to add an "en" prefix to English pages even though I could have omitted it.

Site configuration > Languages > Multilingual system (admin/settings/language/i18n)

  • Content selection mode: Current language and language neutral.
  • Hide content translation links (checked). This hides the language buttons from the bottom of the node content, requiring users to switch languages using the Language Switcher block.

For my content types (e.g. page, story), my workflow settings are:

  • Multilingual support: Enabled, with translation → this added a "Translate" tab to the node, where I entered the Hebrew and Japanese translations
  • Extended language support: Normal - All enabled languages will be allowed.

I had to tinker with my settings.php file to add some multilingual variables:

$conf['i18n_variables'] = array(
  'site_name',
  'site_slogan',
  'site_mission',
  'site_footer',
  'anonymous',
  'menu_primary_menu',
  'menu_secondary_menu',
  'toggle_logo',
    // Different front page for each language
  'site_frontpage',
  'logo_path',
  // For theme variables, read more below
  'theme_settings',
  'theme_acquia_slate_settings',
);

This enabled me to change stuff on the Site Information screen, etc., simply by changing the language prefix. For example, the content in http://globalfamilyproject.org/en/admin/settings/site-information is in English, and the content at http://globalfamilyproject.org/he/admin/settings/site-information is in Hebrew.

I didn't end up using Pathauto, because it was more than I could handle on a tight deadline. I made custom URLs for the English-language pages using the Path module, and the Japanese and Hebrew pages just have node/123 URLs.

One problem I ran into was with the link to the home page in the page header. If I was on a Japanese or Hebrew page and clicked on site title to return to the home page, it sent me back to the English home page. To fix this I had to make the following change to page.tpl.php, which added the language prefix to the home link in the header:

Replace <h1><a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a></h1>

with

<h1><a href="<?php print $base_path; print i18n_get_lang(); ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a></h1>

That's all I can come up with right now. If you want to know about the RTL stuff I did to get Hebrew working, let me know.

Cheers,
Andrea

Thanks Andrea. I want to

sunilkumar's picture

Thanks Andrea.

I want to learn this. For the time being, I am not worried about RTL stuff. This is enough :):)

Regards,
-S-

Thanks so much for sharing

stephthegeek's picture

Thanks so much for sharing Andrea, it looks lovely! Now that Acquia Marina has RTL support in dev we'll be soon turning our attention to Slate as well.

Love the colours :)

~~~
{ Drupal Themes from TopNotchThemes }

The picture and transculate Menu

micha_b83's picture

Hi Andrea,

i like your work, it's really nice. I want the same like you with the picture and the transculate menu. Can you explain how did you do this please. I try it, but it doesn't work at me.

Regards
Micha

should work automatically

citronica's picture

I don't think I did anything special, since the translucent region is part of the theme. I just assigned the menu block to the Frontpage Preface Sidebar block.

Did you read all the instructions at http://drupal.org/node/418326 ?

Sorry I can't be more help,

Andrea

Nice work heartsutra! I'm

doomed's picture

Nice work heartsutra!

I'm working on something similar (slate theme using white background).

About the Front Page

pnathalie's picture

Thanks Andrea for sharing your site.
I was looking for a way to build and international site.

Do you have an idea on how I could set up my site so that, only the the upper part of the front page appears?
I do not need any content part for the front page right now.

Also, how could I avoid the posting date & writer name to appear on the other pages of the site.

Thank in advance for your help.

Nathalie

http://www.go-investsrilanka.com

For Nathalie

sgprs's picture

To avoid showing the posting date, author, etc on pages, just navigate to your theme settings: admin/build/theme/settings. On the right, you'll see "Display post information on". Under that, you can configure what info you want to appear for each content type. Tip: When you create new content types, you'll want to navigate back to this section and deselect the options for the new content type.

To not have content on the bottom part of the page: Right now, you're still at the default Drupal install. Create content, promote it to the front page, then edit it and remove from the front page. Doing this should get rid of the default Drupal notice and leave you with only the content you want (heading, links, etc).

Good luck!
Chris

Not to have content on the bottom part of the page

pnathalie's picture

Thanks Chris for your Tips,

I succeeded to remove the date and author info from the postings.

I have also create content that I promoted to the front page.
When you say "Create content, promote it to the front page, then edit it and remove from the front page."Do you mean remove the content, or remove the page itself(delete?).
If I remove only the content, the title remains. Is there any setting to avoid this.

Also, is there anything I can do to have the user log in appearing only from other pages than the front page.

Thank you again for your Great Help.

Nathalie

thanks for this tips and

byant's picture

thanks for this tips and information.

TNT Themes

Group organizers

Group categories

Type of post

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: