Before we started our website development, I confirmed with my web designer that drupal fully supports multiple languages and that it is not extremely complicated to convert an english website to, say, a dutch one. Now, after many months of work, when I ask him to convert the site into other languages, he is telling me it will be a complicated and lengthy process.
I preprocessed my theme in template.php to switch the logo based upon the user's selected language. ...thought this might be an interesting example to either: a.) help steer someone in the correct direction b.) inspire an alternate approach.
Essentially, what I wanted to do was switch the logo directly in page.tpl.php as opposed to placing it in a block and switching it in that manner. So... this is how I did it (oh, there is also additional code that I use to make my paths in my template file shorter...)
function generic_preprocess_page(&$variables) {
// Create a URL for http(s)
$protocol = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
$url = $protocol .'://'. $_SERVER['HTTP_HOST'];
// Create shorter paths to theme and image directories
$variables['image'] = $url .'/sites/all/themes/generic/images';
$variables['theme'] = $url .'/sites/all/themes/generic/';
$theme = $variables['theme'];
// This is where the language switching occurs
global $language;
$variables['logo'] = $theme .'logo-'. $language->language .'.png';
return $variables;
}
Ok... So, I than placed two logos in my theme directory: logo-en.png and logo-es.png ...or for whichever language code. Now whenever I execute the following code in page.tpl.php
cause i really needs to replace the space with a "_" or a dash
i tried to use the transliteration module and it is good but since it change the languages using the unicode function it makes the old images get broken cause of that unicode translation.
so any one can help me with just how to replace the spaces??????????
Is there any tool that translates the Zend Framework code to drupal code. We develop the code using the Zend framework and we want the same in the drupal. Do we have any tools to do this.
Also, I am new to drupal. Can anyone please let me know how to learn the drupal with examples.
Hi all
I've been looking for a solution for this error for a long time.After I have enabled the Internationalization modules I was able to translate my website to another language.However, any time I translate any content or create a new one I find this error message even that the translation is made. I'm affraid that this might affect other features in the website such as the search box. the error is written below: