| home | forums | resources | search | news | join | members: 6056 |
|
marcusjohans... | Sat, 2007-12-22 07:09 tags: Portals, Drupal, Web Developer First a caveat. This is an ugly solution to a Drupal weakness. What we needed was a way to get panels module to work in three different languages. This solution was the quickest and easiest way of accomplishing the task without going into the core code and changing things. Before you start you have to do the normal installation of i18n module and all of its companion modules. Look to the Drupal.org website and download the needed materials and information before you start. 1. Create a page and call it "start" on the page place the following PHP code. Code does the following. When the abbreviation for the language is seen in the URL there is a redirect to the panel pages url. When you create a panel you are asked to give the URL that the user needs to surf to to seen that panel. In the case of the code below language 'arb' would be redirected to the panel 'arabic'. ollowing the above guideline you should create a panel for each language. Below I have done three panels for english, dutch and french. Each one of these has a corresponding language prefix created by the i18n and locale modules. So I grab the i18n url 'fr' and redirect it to the panels URL 'francais'.
<?phpNow use path alias and set the node/?? to a friendly alias called "start". 2. Now you need a bit of code to keep the page from reloading in a loop. Create a block and call it "start page language switcher" and place the folling PHP code in it.
<?phpUsing the panels module is much easier and more flexible than using just the frontpage module. Panels allows for views, one click changes for layouts and I can pre-create a layout. Drupal and javascript programmer with a careful eye on usability. Marcus Johansson - System Developer |
ASP.NET London Hotels
Content Management Systems Laptop Reviews
Web Developers Just Dial International Calls
Web Developers Excel Training Courses
ASP.NET excel courses in london
Silverlight Data Recovery
PHP Cheap Personal & Secured Loans
PHP Sell Online
|
NewsletterGet updates on Hiveminds services, articles and downloads by signing up for the newsletter. |
Editor's choiceSome of the better articles, stories and tutorials found at Hiveminds. |
Find moreFind more of Hiveminds articles, stories, tutorials and user comments by searching. |
Picked linksHand picked websites and articles from around the web that provide quality reading. |