Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Drupal Internationalization


Published on

Translating a Drupal website? Keep your sanity with these overviews on how to get started!

Published in: Technology, Business
  • Be the first to comment

Drupal Internationalization

  2. 2. TOPICS modules initial configurations what are language negotiations translating nodes translating blocks translating taxonomy translating menus translating views multilingual variables Using Translations Overview Using Translation Interface
  3. 3. Modules
  4. 4. i18n (Internationalization) Translation Overview
  5. 5. Initial Configurations
  6. 6. ADMIN/SETTINGS/LANGUAGE/ Hear me talk... demo maybe?
  7. 7. Language Negotiations
  8. 8. THE GATEKEEPER Global • none (user configurable) • path • kills pathauto if you aren't careful (stay far away from this option) • path prefix with language fallback (total confusion) • path --> user configured (from account page) --> browser's default language --> default site language (which means a mess of untranslated data) • domain • clean Node determined by selected language on node/edit page; language neutral shows on ALL PAGES Blocks/Menus/Taxonomy will show only on specified page will default to default language, or rather, the current admin language *** even if you declare an item to be spanish, 'translation interface' will consider it english because that was your current admin language!! ****
  9. 9. Translating Nodes
  10. 10. per content-type enable support under 'Workflow Settings' by default, all existing nodes in this content type will be 'language neutral', meaning they will appear in ALL LANGUAGES Change any nodes to being a specified language this will allow for the "translate" tab, as well as "translation overview" to manage translations When Translating, a copy of the default text will occupy the fields, (even CCK!), now you can replace them
  11. 11. Translating Blocks
  12. 12. user created blocks options for: language specific All languages (with translations) module created blocks no translations :( views created blocks no translations :( there's a patch!
  13. 13. Translating Menus
  14. 14. user created menu items negotiations are determined by the node in which it links to external links do not contain language negotiations, so they will appear everywhere! requires work around! node generated menu items negotiation is based on node language, then global settings view generated menu items can be assigned to specified menu, they can be translated, however, they will appear on every language!! requires work around Work around... multilingual variables
  15. 15. Translating Taxonomy
  16. 16. Same as blocks, kindof... configure taxonomy kinda like creating related terms
  17. 17. Multilingual Variables
  18. 18. SETTINGS.PHP $conf['i18n_variables'] = array( // Site name, slogan, mission, etc.. 'site_name', // 'site_slogan', // 'site_mission', // 'site_footer', // 'anonymous', // Different front page for each language // 'site_frontpage', // Primary and secondary links 'menu_primary_links_source', // 'menu_secondary_links_source', // Contact form information // 'contact_form_information', );
  19. 19. MORE ON VARIABLES Any variables declared here will override whatever is in the variables table You will notice on the admin fields there will be a disclaimer stating that "THIS IS A MULTILINGUAL VARIABLE' warning you that it will be assigned only to the currently logged in language
  20. 20. Translating Views
  21. 21. works with an i18n filter this means you don't have to declare your nodes to be a specified language if they are only intended to be displayed in a view depends on every other language negotiation examples: nodes displayed by a view through a block node must be enabled, blocks must be enabled, view must have language filter (otherwise you will get duplicates)
  22. 22. Using Translation Overview
  23. 23. Only works with nodes... demo?
  24. 24. Using Translation Interface
  25. 25. works only with taxonomy, menus, blocks, and views Search will help track down all title and body (for blocks) (with the condition that they are set to "ALL LANGUAGES WITH TRANSLATIONS" notice that the untranslated language is crossed out? these translations are stored on the database Export/Import export all translations export .po files and edit them on any PO editor POedit /multi-platform Stay away from REFRESH, only bad things will happen!