When I install Drupal with the standard profile in a another language, the name of the default vocabulary, "Tags", isn't translated. Also, I can't find that string on the localization server.

I'd expect this to behave the same way as other strings which are stored in the database, like content type names:
- I can find and translate the content type names on the localization server.
- If I install Drupal in another language than English, the translated versions are used
- But if I install Drupal in English, and then later import translations, the content type names are not translated

Looking at "Tags" and "Article" http://drupalcode.org/viewvc/drupal/drupal/profiles/standard/standard.in... :

    array(
      'type' => 'article',
      'name' => st('Article'),
      'base' => 'node_content',
      'description' => st('Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.'),
      'custom' => 1,
      'modified' => 1,
      'locked' => 0,
    ),

and

  // Create a default vocabulary named "Tags", enabled for the 'article' content type.
  $description = st('Use tags to group articles on similar topics into categories.');
  $help = st('Enter a comma-separated list of words to describe your content.');
  $vocabulary = (object) array(
    'name' => 'Tags',
    'description' => $description,
    'machine_name' => 'tags',
    'help' => $help,
  );

I don't know if it would be enough to just change it to 'name' => st('Tags'),?

Comments

magnus’s picture

Title: Default installed vocabulary name, tags, date types, block region names, timezone locations, tabs and menus not translatable » Default installed vobacubaly name, tags, date types, block region names, timezone locations, tabs and menus not translatable
Component: locale.module » install system

Sorry to change subject of this issue, but I found this issue while searching why I couldn't translate all strings in D7. They all comes from the installatation.

This is all untranslatable strings that comes from the standard install profile I found so far:

  • The vocabulary name "Tags" at admin/structure/taxonomy
  • All default tags for installed content types: "Title", "Tags", "Body", "Image" at admin/structure/types/manage/article/fields
  • The tag "Machine name" at admin/structure/types
  • All default date types and formats: "Long", "Medium", "Short", "Invisible" at admin/config/regional/date-time
  • All default block region names at admin/structure/block
  • All timezone locations at admin/config/regional/settings (in Date module all locations where translatable)
  • The tab: "COMMENT FIELDS" at admin/structure/types/manage/article/comment/fields
  • The tab: "COMMENT DISPLAY" at admin/structure/types/manage/article/comment/fields
  • The label: "Comment" at admin/structure/types/manage/article/comment/fields
  • The menu: "Management" at admin/structure/menu
  • The menu: "User menu" at admin/structure/menu

--edit: comment tabs are now translatable.

magnus’s picture

Title: Name of default vocabulary "Tags" not translated » Default installed vocabulary name, tags, date types, block region names, timezone locations, tabs and menus not translatable
Component: other » install system

Misspelled...

magnus’s picture

Component: install system » language system
plach’s picture

Component: language system » locale.module

We need Gabor's feedback here.

David_Rothstein’s picture

Title: Default installed vobacubaly name, tags, date types, block region names, timezone locations, tabs and menus not translatable » Default installed vocabulary name, tags, date types, block region names, timezone locations, tabs and menus not translatable
Component: install system » locale.module

Related issues:
#1016006: Default title, body and other field labels not localizable
#1048006: Name of vocabulary (Tags) created during install cannot be localized
#1050686: Theme region names are no longer translated

I guess in some ways they could all be considered duplicates of this issue, but on the other hand, the rules for what should be translated when are complex and differ from case to case, so I think it's better to have separate patches that can be discussed separately.

Nonetheless, if anyone who really understands this stuff has time to provide guidance either in this meta-issue or in the other ones, it would definitely help :)

gábor hojtsy’s picture

Yes, the general "problem" is that we'd need to import translations before all these installations happen for them to be created properly. The Drupal core profile is now more like a module and provides its dependencies, which are all installed before the profile itself. So, when Drupal gets to the profile and imports the .po file for the profile, all the database stored values are already created.

Generally, everything that is stored in the database and is not translated on the fly, like content type names, vocabulary names, etc. are stored in one language only. If we run the translation import before these are saved, they will be saved in the translated language. They'll not be multilingual anyway, because they are "user generated / admin provided content" and Drupal 7 core does not have support for translation of these things to multiple languages. So we could fix the install to install them in a proper language by importing the .po file earlier, but it will still be mono-lingual.

The l10n_install profile has an issue to fix this situation at #1027614: Move translation import to an earlier stage, at least for core, since it does the imports all in itself.

gábor hojtsy’s picture

Version: 7.x-dev » 8.x-dev

What is not covered by #1016006: Default title, body and other field labels not localizable that is discussed here?

Robin Millette’s picture

Timezone locations, for one thing.

gábor hojtsy’s picture

Version: 8.0.x-dev » 7.x-dev

Does not apply to Drupal 8, we resolved this in Drupal 8. In fact you can even download translation updates to shipped config and it will work :) Woot.

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.