feature request #5914
openprovide drupal installation profile for multilingual sites
50%
Description
requires steps:
1. install the required modules
IMPORTANT*: The translations supplied with the cdm_dataportal module will only be imported during the module installation if the according languages are set up *before installing the module!!!!
enable language and i18n & i10N modules (see #5913 for details)
enable all languages provided with the cdm_dataportal module.
import the translations:
first install and enable l10n_upate
drush -l "<drupal-site>" en l10n_update
then import the translations
drush l10n-update-refresh drush l10n-update --languages=...
- enable the cdm_dataportal module
Alternatively we could provide easy to use functions that allow portal maintainers to activate languages and to automatically import the according translations.
2. setup the language switcher
place 'Language switcher' block in reqion 'navigation bar' and set the block title to ''
add the following css rules to the 'CDM DataPortal base theme' 'User defined styles':
#block-locale-language { margin-top: -2.8em; float: right; } ul.language-switcher-locale-session { padding-right: 5px; } ul.language-switcher-locale-session li { display: inline; } ul.language-switcher-locale-session li a:link, ul.language-switcher-locale-session li a:visited { color: white; }
3. Configure content types
This is recommended for the content types article and Basic page:
- in admin/structure/types/manage/{content_type} :
a. Publishing options > Multilingual support: (x)Enabled, with translation
a. submit form
a. Multilingual settings > Extended language options: Set current language as default for new content & [x Require language (Do not allow Language Neutral).
- admin/structure/types/manage/{content_type}/display :
a. set Language to Hidden
- go to
/node/1/translate
and click add translation or directly go to/node/add/page?translation=1&target=es}}. This will create {{{node/2
as spanish translation ofnode/1
5. Site set up
go to
/admin/config/system/site-information?variable_realm_key_language=es
and set the spanish Default front page: [node/2]if you need to tranlate the site name, go to the same page as above and set the Site name
multilingual front page variable :
admin/config/regional/i18n/variable
Site information > [x] Default front page
6. Set up menus
in
admin/structure/menu/manage/main-menu/edit
Multilingual options >> Translation mode set (x) Fixed Language. and choose Language Englishgot to
admin/config/regional/translate/i18n_string
check Menu and [x Clean up left over strings and submit the formNow a new Menu items can be added. The language of the menu item is determined by the node language it is pointing to.
7. Set permissions
Add permissions to @CDM admin@:
administer content translations administer languages translate content translate interface translate user-defined strings
Creating Profiles
Examples and Templates
The drupal module l10n_install could serve as template for our own installation profile. Source code for Drupal 7 is found here: http://cgit.drupalcode.org/l10n_install/tree/?h=7.x-1.x
Related issues