Planet Drupal

Subscribe to flux Planet Drupal
Drupal.org - aggregated feeds in category Planet Drupal
Mis à jour : il y a 6 min 21 sec

Drupal Watchdog: VIDEO: DrupalCon Amsterdam Interview: Leslie Hawthorn

jeu, 30/04/2015 - 18:54

A lively LESLIE HAWTHORN (Director of Developer Relations at Elasticsearch), finds herself momentarily corralled and questioned in a corner of the RAI Convention Center.

Besides her day-job, Leslie is involved in open source security issues and, as a second calling, mentors young women on the nuances of building careers in technology.

Privately, Leslie is an avid pickler, with a cupboard stash of yummy, lacto-fermented veggies: radishes, kohlrabi, cabbage, and cucumbers.

Video: 
Catégories: Elsewhere

roomify.us: Vacation Rentals, Hotels, B&Bs, Multiple Properties and Booking with Drupal.. oh my!

jeu, 30/04/2015 - 17:35
It’s now just over three months since roomify launched. We’ve been enjoying the process immensely, despite the inevitable frustration of trying to set up everything that a business requires. What has kept us going is the satisfaction of hitting product milestones, and hearing back from users and clients about how our products are helping them. (We also like getting paid - that’s awesome too!). As such, we are particularly pleased to share this update with you.
Catégories: Elsewhere

Wellnet Blog: Drupal Weekly Module Review - #9 Smart Trim

jeu, 30/04/2015 - 14:55

Today we’ll talk about Smart trim, a very interesting module that I recently found on drupal.org and I start using immediately.

But what does this module is for?

Quite simply, it adds to the text fields a new display format (Smart trimmed) with many new settings...

Catégories: Elsewhere

Jim Birch: Integrating Drupal with Cloudflare

jeu, 30/04/2015 - 12:30

The super smart lead developer at Xeno Media first brought the Cloudflare service to my attention as it was integrated with one of the hosts we were using.  We experimented with a site that was experiencing outages due to traffic spikes it received after sending an email newsletter.  After the switch, the server never went down again, saw considerable speed improvements, and we were able to quadruple the number of emails we could send per hour, with no performance hits.

According to Cloudflare, sites that use their service:
  • Load twice as fast
  • Use 60% less bandwidth
  • Have 65% fewer server requests
  • Are way more secure

If a free Content Delivery Network that makes your site seriously super awesome, incredibly blazing fast wasn't enough, the more you look at Cloudflare's features, the more you will be impressed.  Not only does Cloudflare serve your site from a distributed network, closer to where the user actually is, it optimizes, aggregating content from different external services (think Google/Facebook/Marketo) into one, speeding up delivery to the browser

Read more

Catégories: Elsewhere

Acquia: PHP Reset, PHP Renaissance: Unify everything in PHP with Composer

jeu, 30/04/2015 - 08:20
Language Undefined

It was great to get the chance to sit down and talk with Jordi Boggiano at SymfonyCon Madrid 2014. Jordi is responsible for Composer, one of the most important pieces of technology that is driving PHP interoperability and the PHP "renaissance" of the last couple of years. He's also on the Symfony2 core team, "and bad about telling things about myself."

Catégories: Elsewhere

Expresstut: Using the WOW js module in drupal

jeu, 30/04/2015 - 01:58

In this tutorial we will be using the wow js module for revealing different animation effects on various blocks on the site while scrolling. To follow along in this tutorial, you would need to download and install these three modules

Once this modules have been installed, you can simply click on any block on your site, go to configure block and a new section for animation should appear where you can then add an animation effect to that block.

Catégories: Elsewhere

KatteKrab: Constructive Conflict Resolution

jeu, 30/04/2015 - 00:09
Thursday, April 30, 2015 - 08:09

I'm speaking at DrupalCon Los Angeles. 5pm, Tuesday 12 May in the 518 - Trellon room.

I first spoke about Constructive Conflict Resolution in Amsterdam at DrupalCon last year. I posted the slides, recording and speakers notes from that talk to the PreviousNext blog.

I'm reprising that talk in Los Angeles because someone else is now unable to make it, and I was asked if I could fill in. When I originally proposed the talk for LA I had planned to rework the slide and narrative - but unfortunately won't have much time to do that before the conference. However this is a conversation starter, and we'll have an opportunity in the room to discuss how we might embrace conflict as a force for good, as a force for progress. How to harness it, how to minimise it's potential for harm.

I hope to see you there!

Constructive Conflict Resolution will be in the core conversations track at DrupalCon Los Angeles.

Catégories: Elsewhere

DrupalCon News: First Time Attendee Social

mer, 29/04/2015 - 22:08

Attending a large conference for the first time can be both exciting and uncertain — and DrupalCon is no exception. What should first-time attendees to DrupalCon expect? 

Catégories: Elsewhere

Promet Source: Melding AngularJS With Drupal Sites

mer, 29/04/2015 - 20:29

After spending the weekend going through a rather excellent (I thought) video overview course on AngularJS, my head was spinning with the possibilities when it came to building Drupal sites that were much more responsive in terms of loading and displaying content. So, I decided to start working on some proof of concept modules that would help me better understand how to effectively meld these two tools together.

Catégories: Elsewhere

Lullabot: Should you Decouple?

mer, 29/04/2015 - 20:00

One of the major topics of discussion in the Drupal community has been decoupled (or headless) Drupal. Depending on who you ask, it’s either the best way to build break-through user experiences, or nothing short of a pandemic. But what exactly is a decoupled architecture?

Catégories: Elsewhere

Midwestern Mac, LLC: Developing for Drupal with Vagrant and VMs

mer, 29/04/2015 - 16:21

Many blog posts have outlined the benefits of using VMs (Virtual Machines) for local Drupal development instead of either using native PHP and Apache, or a bundled environment like MAMP, XAMPP, or Acquia Dev Desktop. The advantages of using virtualization (usually managed by Vagrant) are numerous, but in certain cases, you can make a good argument for sticking with the traditional solutions.

If you'd like to take the dive and start using virtualized development environments, or if you're already using Vagrant and VirtualBox or some other VM environment (e.g. VMWare Fusion or Parallels Desktop), how do you optimize local development, and which pre-bundled Drupal development VM will be best for you and your team?

Criteria for the Perfect Local Development Environment

These are the criteria I use when judging solutions for local Drupal development (whether virtualized or traditional):

  • Should be simple and easy to set up
  • Should be fast by default
  • Should be flexible:
    • Should work with multiple providers; VirtualBox is free, but VMWare can be much faster!
    • Should allow configuration of the PHP version.
    • Should work with your preferred development workflow (e.g. drush, makefiles, manual database sync, etc.)
    • Should prevent filesystem friction (e.g. permissions issues, slow file access speeds, etc.)
    • Shouldn't have hardcoded defaults
  • Should be complete:
    • Should work without requiring a bunch of extra plugins or 3rd party tools
    • No extra languages or libraries should be required (why install Ruby gems, npm modules, etc. unless you need them for your particular project?)
  • Should be Free and Open Source
  • Should include all the tools you need, but allow you to disable whatever you don't need (e.g. XHProf, Apache Solr, etc.)
  • Should work on Windows, Mac, and Linux with minimal or no adjustment
  • Should be deployable to production (so your local dev environment matches prod exactly)

A lot of these points may have more or less importance to a particular team or individual developer. If you're a die-hard Mac user and don't ever work with any developers on Windows or Linux, you don't need to worry about Windows support. But some of these points apply to everyone, like being fast, simple, and flexible.

Catégories: Elsewhere

Modules Unraveled: 134 Deciding when to upgrade to Drupal 8 with Kristof Van Tomme and Peter Kohan - Modules Unraveled Podcast

mer, 29/04/2015 - 14:30
Published: Wed, 04/29/15Download this episoded8upgrade.org
  • What is d8upgrade.org?
  • When did you put the site together?
    • Today
  • How were you offering the service before the site was up?
    • Talk about MVP
  • Why did you guys create this service?
    • Build a more direct communication channel for module maintainers - Mailing list (module devs talk to people using module
    • Initiative to get out the catch 22 - modules aren’t ready, so you can’t upgrade, you don’t upgrade so the modules don’t get money to be upgraded.
  • Does it cost anything?
    • Nope - it’s free
  • Are you planning to monitize the site in any way?
    • We expect a lot of site owners will be looking for a way to upgrade their website, if they don’t yet have an agency, we can help them find a good agency. If this evolves how we imagine, this could fuel the sales pipeline for our consultancy and a few selected partners. We are not going to go hardcore salesy on this, but put in links for module work and 2for1 discounts and hopefully some of those will convert into customers for us or our partners.
  • How does it work? What do I have to do to track a site?
    • As simple as possible, conscious choice to not make it a module - just copy paste your module page
  • How many people have signed up so far?
    • We’ve got a total of 73 sites now, some from the same people - after Drupalcon LA we expect that to become a few hundred.
  • What do you have planned for the future of the site?
    • The community misses a permission marketing channel for module developers. We would like to let site owners sign up for important information about the modules they use through a push communication channel. There is a lot of talk in the community that we are not getting any support from site owners for the development of D8, but we’ve made it almost impossible for them to stay up to date. There is no way they are going to start reading the issue queues of modules on regular basis.
  • I took a look at the site and saw something called 2for1 - Give to Get. What’s that?
    • This is part of the strategy we want to use to monetise the platform: we offer our customers a 2 dollar discount on their future D8 project for every dollar they invest in helping Drupal 8 get out of the door. This gets us more business and brings outside funding into the community. For too long we’ve been giving money from one developer’s pocket to the next developer’s pocket. We hope we can change that this way. We are inviting other consultancies to join us in this campaign, if you want to join, you can become a partner in the campaign.
Special Thanks!

Thank you FourKitchens for the DrupalCon Ticket and Kalamuna for helping offset my travel expenses! You guys (and gals) are all awesome!

Episode Links: Kristof on drupal.orgKristof on TwitterKristof on Skype - kvantommeKristof on LinkedInPeter on drupal.orgPeter on TwitterPeter on LinkedInPeter on Skype - kenya1hud8upgrade.orgTags: Drupal 8Upgradingplanet-drupal
Catégories: Elsewhere

Jim Birch: Drupal 7: Organizing with Field Group

mer, 29/04/2015 - 13:30

The Drupal Field Group module has been on my Essential Drupal list since I first learned about it, and with 200,000 installs, I am certainly not the only one.

Field Group lets you add the common CCK field wrappers on their own so you can organize not only the display of the nodes through the Entity View Modes, or Display Suite on the "Manage Display" tab, but it also lets you organize fields as they are displayed to the administrator on the Add and Edit screens through the "Manage Fields" tab.

Field Groups allows for adding and configuring of the following field types:

  • Fieldsets
  • Horizontal tabs
  • Vertical tabs
  • Accordions
  • Divs
  • Multipage steps
  • HTML5 elements
  • HTML elements

If you are using a default Admin theme like Seven, adding and configuring the default Fieldsets, tabs and accordions make your content configuration screens blend in perfectly since they are already styled.  You can also take your node add and edit screens to the next level by theming DIV's, or any HTML/HTML5 elements if you are using your front end theme for administration screens, or a custom admin theme.

Read more

Catégories: Elsewhere

Gizra.com: Cross Browser Visual Regression Tests With Shoov

mar, 28/04/2015 - 23:00

Maintaining visual regression tests can be hard, but the more tests we write for our projects, the more we see the tremendous power it provides in terms of QA and monitoring our sites.

One daunting task each developer hates (and often avoids) is validating their markup on multiple browsers. All of Gizra's developers use either Mac or Ubuntu on their machines, so the line to the "IE computer" on the far end of the office is getting long. Way too long.

And honestly - after our poor developers validated their work once, if we'd ask them to do it again. And again. And again... we'd probably be left without any.

Developers moral shouldn't be underestimated!

Shoov means "Again" in Hebrew for this very reason.Go ahead and jump to our example repo which now has cross browser tests. Writing your tests once - but testing on multiple platforms and browsers is a big win.

DuckDuckGo.com tested by BrowserStack on Windows7, IE11, with 1024x780 resolution

Continue reading…

Catégories: Elsewhere

DrupalCon News: Come to the Community Summit

mar, 28/04/2015 - 18:50

Submitted by:  William Estrada - DCon LA Community Summit volunteer

Do you love your local Drupal community?  Do you want to grow Drupal adoption in your hometown? Do you take satisfaction is providing mentorship or are you looking to pay it forward after being mentored? Are you the person who always raises their hand to help others and wants to get involved?

Catégories: Elsewhere

Drupalize.Me: How to Contribute to Translations in Drupal Projects

mar, 28/04/2015 - 14:02

Let’s take a brief look at how translation contributions work in Drupal. This written tutorial is based on the free video, Translation in Drupal.

Catégories: Elsewhere

Jim Birch: Essential Drupal: Global Redirect Module

mar, 28/04/2015 - 13:00

The Global Redirect module ensures that we will have the best possible technical output from Drupal for Search Engine Optimization (SEO).  It is available for Drupal 6 and Drupal 7, and it looks like they have been hard at work building it for Drupal 8.

For years, the best practice for any site is to make the URLs keyword rich and friendly so the user knows what to expect when they visit.  So we change Drupal's "Clean URL" settings from jimbir.ch?q=node/27 to jimbir.ch/node/27 and then we change Pathauto's settings from jimbir.ch/node/27 to jimbir.ch/blog/essential-drupal-global-redirect-module.

What we are missing is that those original URLs still remain live on the internet, and can be considered duplicate content, a detriment to good SEO.  Global Redirect automatically sets up 301 Redirects for both of the old URL schemes, to the new friendly URL.

The same goes for the trailing slash.  This module removes (or adds if you so choose) the trailing slash, so there will be only one canonical URL living between jimbir.ch/page and jimbir.ch/page/

The last big option is the home page.  In Drupal's Site Information, we set which node we want as the site's homepage.  Global Redirect makes sure that we only have one page indexed, rather than jimbir.ch and jimbir.ch/home.

There are quite a few more options that can be configured at:

Read more

Catégories: Elsewhere

ERPAL: 6 steps to avoiding unrealistic budgets and deadlines in projects

mar, 28/04/2015 - 12:50

In our preceding post we focused on the topic of "responsibilities and communication" and the importance of questions that help to clarify duties and responsibilities. Today we’ll deal with unrealistic deadlines and budgets – and how to avoid them.

An 800-hour project is not finished in a day, not even with 100 programmers. The completion time of a project is derived from the sum of the times estimated for the individual requirements. In order to do this reliably, it’s essential to know in detail what has to be done. This is why requirement engineering is vital at the beginning of a project. Even though a deadline (completion date) is determined by the sum of expenses, it’s important to note that not everything in a project can run in parallel, meaning that more is not always faster. A project plan for the overall project and for every single sprint will help you to control the progress, expenses and deadlines.

1) What task requires what expertise?

Not every job requires the same expertise. In addition to technical skills, there are often technical requirements that are necessary to reflect specific customer business processes in the software. These requirements should be stated in the individual tasks. It’s part of the project management to make this categorization a responsibility of the developer. If you optimize your project plan, for example with a Gantt chart, you can plan resources such as time, money and people at the beginning of a project and validate the plan accordingly.

2) Which developers can do which tasks?

One developer is not equal to every other developer. Everyone in the team has specific competencies: you get selected for a project because your skills fit well. Even in software development, it’s rarely the case that everyone all has the same expertise. A good Drupal developer is not necessarily a good site builder nor a good themer. You might make this assumption when hiring a person, but you’ll be disappointed if you don’t verify his/her skills. Therefore, you should be able to associate the expertise of your team with the specific tasks on hand. A good way to illustrate the dependencies of tasks is with a Gantt chart: for realistic budgeting you need a detailed plan so that you know, as a provider, what you have to achieve over which period of time. On the customer side, a detailed plan with clear time estimations helps you know what you’re getting for your money so you can rest assured that all the features – such as deadline, budgets, prices and specifications – are realistic. This is necessary because you want to achieve something positive with your project and, thus, have to rely on the data from good and realistic planning. The deadline is determined by adding up the times required by each developer in the team, taking the dependencies of each task into account. Plan in a fixed buffer for project management, quality assurance and communication.

Project management cannot be hurried. It costs time and money, but if done right, it’s worth it. When the project’s time and budget are reaching the end without the certainty that the project itself is facing a successful end, the quality inevitably suffers. So: plan realistically to protect your team from unnecessary stress and to provide your customer with the assurance that he can count on your word. This is an essential foundation for any successful project.

3) Done does not equal completed

Even when all the development work is done in your project, it doesn’t mean that the project is really completed. Now, when acceptance is imminent, the integration of all the single tasks needs to be (double-)checked. When deploying the project to acceptance you should definitely first check internally whether all benefits promised in the concept were actually implemented and tested. This usually happens on a staging system to prepare a customer presentation. Optimally, for each task you should also be able to demonstrate that you’ve fulfilled it with the promised performance and validated it by testing for proper execution. Only once this internal process is successfully completed should the project results be presented to the client for approval. Unfortunately, it’s often overlooked that the cooperation of the customer is required: your customer needs to test his specification accordingly and, hence, accept the project if there are no more serious bugs. Working cleanly and in detail is even more important at the beginning of the design phase. This becomes evident not just in the acceptance: if there are only minor bugs that don’t prevent the functioning of the concept, the project must be accepted with a bug report, which will then be attached to the acceptance report.

So, try desperately to stick to the following points:

4) Only provide what was actually tested

Although you have the right to repair, it looks unprofessional if you provide your customer with a project result that has obvious errors. This casts the project team in a poor light. So, write down what you’ve tested. Key points about each task and the benefits of the concept are sufficient. Clear acceptance criteria will help prove that all the requirements have been fulfilled

5) Involve your clients in the acceptance and prepare it well

Nothing is worse and more unproductive than if you provide your customer with the results of the project after three months of silence. Certainly, you may argue that you’ve just been doing focused work, but communication is simply essential to managing expectations. Your customer will feel lost if you don’t communicate at all. If you don't communicate recent status updates in recurring meetings, your customer will create his own expectations regarding the progress. So, communicate and show individual project results continuously – but only when they’re also really presentable. Engage your clients in the purchase process and show a demo of what the software can do and how that fits into the concept you created earlier, so your customer isn’t left with doubts and ambiguities but can ask you directly. Questions and problems can then be discussed immediately – and resolved.

6) Collect all the aspects that your customer wants to be changed

Sure, there will be functions and requirements that must be implemented in the software before it can go into production. Collect all these points in an initial protocol. Then, evaluate the different points, examine the requirement changes (change requests) and determine which of the points are still outstanding to the concept. Those still owing must either be implemented as soon as possible or appear in the internal quality assurance. Actually, they shouldn’t be there at all if you’ve already tested internally against the specifications! Change requests are then processed after acceptance. The same applies to minor bugs that don’t affect the functionality.

Both parties should have the same goal: To achieve (partial) acceptance and thus arrive at a decision that a project milestone is completed, after which work can continue and the software enhanced with other useful features. The project is taken forward after each individual milestone, with partial acceptances for single milestones and checks against the project objectives. This has the nice side effect that your customers will become familiar with the software in small pieces and you’ll get immediate feedback on whether the development is going in the right direction or not. So you see :

An agile approach doesn’t mean that there’s no concept! Quite the opposite – planning is important.

In the planning phase, particularly in terms of effort and deadlines, you have to count on further work after acceptance of the project.

The next post will deal with how to manage agile projects with structure and control.

Other blog posts of this series:

These 3 questions help you to ensure satisfactory project results

Setting objectives in projects with these 3 rules

Agile projects for a fixed price? Yes you can!

3 things to consider when creating project specifications

6 rules to follow to promote communication in projects

Catégories: Elsewhere

Vardot: Ready to Upgrade Your Website? Here's Tips for Migrating to Drupal

mar, 28/04/2015 - 10:38
Resources

A basic content management system works fine for a simple, static website, but for those of us with content-heavy websites—like online news platforms or schools or non-profits—a basic CMS will be hopelessly overmatched. Dynamic companies and organizations need a correspondingly agile CMS to effectively meet their web needs—and the words “dynamic” and “agile” and “effective” are all practically synonyms for “Drupal.”

Drupal is generally regarded as the most powerful and adaptable open source CMS available, and it’s utilized by influential news organizations like Al-Jazeera, powerful NGO’s like UNRWA, and prestigious universities like Georgetown. Additionally, Drupal boasts an active and passionate developer network that ensures that it’s an excellent system because it's constantly evolving to meet your evolving needs.

But a trade-off for its power is its complexity, and the simple truth that Drupal is a powerful tool that can potentially be overkill for a modest website—and this means migrating to Drupal shouldn’t be taken lightly, and that you will need to work with a competent development team.

But if you’re willing to undertake a few simple steps, you can discover whether or not Drupal is the CMS for you and make the process of migrating to Drupal simple and stress free,  while unlocking its incredible potential…

1. Map your Ambition

This is basic, but necessary, and if you avoid it it can come back to bite you down the road. Identical to if you’re planning on moving your business to a new office or introducing a new product or campaign, you need to turn that idea into a tangible model before you can actually proceed with any direction.

When it comes to migrating to Drupal, this will allow you to estimate how many resources you have to commit to the project and what your expectations are, and will reveal to you how achievable your ambitions are.

You should ask yourself:

  • What’s the timeline for your migration?
  • How soon do you need to see a return-on-investment?
  • Which in-house employee will oversee the transition? 
  • What do you envision the minimal viable product looking like?
  • What potential hangups can you not possibly incur?
  • How much is the opportunity cost of upgrading?

Covering these simple steps will make it clearer whether or not you’re ready to migrate to Drupal, and armed with this model you’ll be ready to get the actual wheels turning towards your goal.

2. Perform an Organizational Site Audit

The Drupal development team needs to understand your organization's needs if it's going to build a functional website, and that means your organization can’t have a vague idea of what it needs—it needs a concrete understanding. You should comb through your site and analyze its functionality versus your needs. This will save innumerable back-and-forth meetings and potential disaster down the road—when you’re in too far to turn back.

So before collaborating with Drupal designers, you should to be able to identify:

  • Which components currently provide value from the source site?
  • Which parts need to be migrated from the source site?
  • What enhancements to design and functionality does your new site require?
  • Which design or functionality features you would like to retain?
  • Which required features from the old site will be difficult to integrate because of custom design?
3. Select the Right Drupal Development Team

Now, having actualized your ambitions and mapped your situation, you should be able to consult with a Drupal development team and let them dig into your site with a technical site audit. But to do that, first you need to find the right developers for the job–and this should be done carefully.

A couple things to look for when choosing your team:

  • Are they Drupal approved?
  • Does their portfolio contain similar projects to yours?

As said before, Drupal is a complex CMS, and if you entrust your web development needs to an inexperienced developer or hire a single freelancer to handle a demanding task, the development process will stressful and the eventual product will undoubtedly be flawed. 

Freelancers have their merits—but if you contract a Drupal development team with a proven track record of success, you will be dealt with efficiently and professionally. The resulting migration process will be stress-free and your updated site will be up and running promptly.

Migrating to a new CMS can be a daunting process—but it doesn’t have to be. If you put in a little legwork, and collaborate with top-notch Drupal experts like Vardot, your resulting website will satisfy your requirements and put you one step further along the path to success in an increasingly digital world.

Questions or Comments? Respond below or drop us an email and we’ll get back to you no time.

Tags:  Migrating to Drupal Drupal Development Drupal Planet Title:  Ready to Upgrade Your Website? Here's Tips for Migrating to Drupal
Catégories: Elsewhere

Amazee Labs: Drupal 7 total language fallback

mar, 28/04/2015 - 09:22
Drupal 7 total language fallback Reasons for language fallback

Let's assume you have a website divided by countries. The site structure is:

  • Global (en, de, fr)
  • Germany (de)
  • France (fr)
  • Switzerland (de, fr)

You have your content translated to three languages. Normally, this works, but there could be cases when you need languages per country. Words might have a slightly different meaning from country to country (examples) or spelling might be different (en-US vs en-GB, or using "ß" in de-DE vs "ss" in de-CH). Or, for example, the "Contact us" page can contain a country specific information - locations.

So, the site structure can be turned to:

  • Global (en, de, fr)
  • Germany (de-DE)
  • France (fr-FR)
  • Switzerland (de-CH, fr-CH)

This can bring a translation nightmare until you have a language fallback ;)

Having the language fallback, you would only translate strings/content to the "base" languages and, in special cases, you may also translate to "country" languages.

Fortunately, there is a module for that. The Language fallback.

Language fallback 7.x-1.x

The first version of the module provides language fallback only for locale strings (strings that are passed through the t() function). After the module installation, you can find the "Language fallback" option at the language edit form.

If a string translation is missing for the de-CH language, the translation from the fallback language (de) will be used in this case.

How the locale fallback works

There is a strings override feature in Drupal 7 core. Basically, you can define translations for some strings via variables. For example, you can put something like that into your settings.php file:

$conf['locale_custom_strings_de-CH']['']['Home'] = 'Startseite';

While this possibility is used really rarely, the Language fallback module transforms it into the real power. It saves instances of the localeWithFallback class to locale_custom_strings_* variables. The localeWithFallback implements ArrayAccess, thus it can return string translations automagically.

Language fallback 7.x-2.x

We also want to have the language fallback for our content translated via the Entity Translation module. The second version of the Language fallback module provides this feature.

This option enables the translation fallback for entities on the field level. For example, if an entity does not have a certain field translated to the de-CH language, the de translation of this field will be used for the entity rendering.

How the entity translation fallback works

Actually, this ability is provided by the core Locale module. The Language fallback module just hooks into the process.

Here is the call stack describing how it works:

  • field_language()
  • hook_field_language_alter()
  • locale_field_language_alter()
  • locale_field_language_fallback()
  • language_fallback_get_candidates()
  • hook_language_fallback_candidates_alter()
  • language_fallback_language_fallback_candidates_alter()

The last function does the job.

Language fallback chains

That's another feature only available from language fallback 7.x-2.x.

Now, on the language edit form, you can define several fallback languages in a particular order.

Language fallback 7.x-2.x-amazee

If you try to use the language-per-country workflow with the Language fallback module, the first thing you'll miss is the i18n support. The Internalization module helps us to deal with the translation of menu links, field labels, panels, etc. So, we started work in this direction and have prepared a patch.

After the patch was tested, we found that it would be quite useful to have the fallback information displayed right on the translation overview pages. We implemented this feature, too.

Before:

After:

We've submitted a patch containing both improvements to #2322883: Add support for i18n strings.

After using the new overview pages for some time, we decided to also improve the entity translation overview pages, since it improves the usability for content editors.

This developed into another patch #2444203: Show fallback information on the translation overview. This time, for the Entity translation module. (Be sure to enable the "Show fallback statuses on overview pages" checkbox on the admin/config/regional/entity_translation page after you have applied the patch.)

Language fallback for path aliases

There was an issue we have met implementing language fallback on our projects. The Pathauto module only generates aliases for the existing node translations. To fill that gap we have created the Path alias force module. It forces creation of aliases for all languages. Furthermore, it supports language_fallback, so aliases respect the fallback rules which is nice.

Total language fallback

Having all these patches applied, we have the complete solution for the language fallback on Drupal 7 websites. Now the language-per-country workflow can be used for real projects.

BTW. If you don't want to apply patches, you can use the Amazee Labs repositories which contain all required changes:

Let us know if you have any issues!

Catégories: Elsewhere

Pages