5

I am developing a multilingual site that supports English and Norsk bokmal. I have set English as my default language. I wanted to translate the contents and the other things in the site.

My real problem started when I found that I was unable to see the translation of the content type's name. I went to admin/config/regional/translate/translate and translated everything, but still my content type's name is not translated.

I have attached a screenshot of the translation page. Still I don't find a way to translate the content type's name.

screenshot

2
  • I didn't have time to try for now, but there is a recent patch that could be the solution.
    – user8818
    Aug 2, 2012 at 17:04
  • That patch is for translating the content type name in the messages shown by Drupal when a node is saved.
    – apaderno
    Aug 3, 2012 at 8:07

3 Answers 3

9
+50

First, I must point out that if all you want is a single language non-English website you should not install the Internationalization project, and not enable the Multilingual content module (part of the Internationalization project).

If you have this problem with a single-language non-English web-site, all you need to enable the Locale module (part of core) and enable the Localization update module. See the first part of this answer to see how to deal with this if you've a problem with content type names not being translated on a single language non-English website.

However, if you're creating a multi-language website where the user interface and the content shall be in multiple languages (due to various detection and selection strategies), then you need to install a project named Internationalization and enable several of its sub-modules, including one named Multilingual content.

However: Do not do this if all you want is to have the the site user interface and its content in a single language that is not English. The Internationalization project is (IMHO) hard do configure correctly, and still have some serious bugs unfixed. Do not install it unless it is absolutely required.

If you need a multi-language website and you've configured it and you've configured the language settings and already set another default language than English, then the names of content types will not be translated by default, even if the translations for the names of these types are already present in the translated strings listed for the built-in interface.

When you enable the Multilingual content module, a column named Node types will appear in the translate interface overview (if this column do not appear, then the Multilingual content module is not enabled). For the names of the content types to appear, you ned to have these translated in the text group Node types as well. The recipe below tells you how to do this.

I really think this is a bug in the Internationalization module, and as such is off-topic here. See Translate interface for nodes, fields, etc. show wrong language in the column for the issue.

However, I was able to get the node types translated at my site by doing the following:

First, I made sure that I installed the Internationalization module and all the required helper modules (such as Multilingual content) before I added any languages. I also made sure that I used English as the default language all the way during the translation process.

So you do the following with English as the only language enabled (if you've got additional languages enabled, uninstall them, you will also need to disable and uninstall the Internationalization module and all its helper modules to get a clean start):

  1. Download and install the Internationalization project.
  2. Enable the Multilingual content module (part of the Internationalization project).

Then add any additional languages you want, but do not enable them. This is supposed to add translations for the Built-in interface and Node types. However, to me it looks as if the translations for text group Node types is not automatically imported when you enable a new language after you enable Multilingual content.

You can confirm this by looking under the "Overview" tab of the translation interface:

Overview 1

If the percentage in the "Node types" for your second language is ("Norwegian Bokmål" in the image above) is 0%, the translated strings for the Node types has not been imported into the translation interface. This means that even after you enable that language, the fallback English strings will be used.

However, it should now be possible to add these translation by hand. Navigate to the translate tab of the translation interface, and limit search to Node types.

Translate

The strikethrough over the string with the two letters in the Languages column means that the translation is missing. Click "edit" to add the missing translation.

This exact procedure fixed it for me as can be seen from the "Overview" tab below. The percentage for "Node types" for "Norwegian Bokmål" in now 100%.

Overwiew 2

After doing all the above, it is OK to set a non-English language as default.

2
  • 1
    It kinda doesn't make sense that you have to set English as your default one first, then do the translation and change the primary language afterwards. can you explain why you need to do that?
    – Sohail
    Oct 28, 2013 at 12:36
  • 1
    @Sohal, no, I can't explain it. There are some clues why you need to do it in this issue queue, but I haven't looked into it in depth. However, if I don't do it the way I describe, the translation field is set to "English", and there is no way to add node types translations for the target language. I think that this is a bug somewhere in the Internationalization project. My answer here is just a way I found to get around this bug. Oct 28, 2013 at 13:33
4

You'll want to enable Multilingual content, one of the i18n submodules. This will add a Node types option to the translation interface.

8
  • Thanks for reply patrick. But i see that i have enabled the Multilingual content in my modules page. I do get a option like node type in translation page. I have a content type called news i gave the equivalent translation as nyher. But when i shift my languages i don see a translation happening.
    – user4081
    May 10, 2012 at 8:48
  • Are you on D6 or D7? I have it working on D7 out-of-the-box with these i18n modules: Multilingual Content, String Translation, Field Translation plus core's Locale and Content Translation. May 10, 2012 at 8:52
  • I am using D7. I have also enabled all the modules as mentioned by you. I used panels to display the content's type in a page. When i shift language "NEWS" is what it shows and not "NYHER". I don know where the exact problem is:(
    – user4081
    May 10, 2012 at 8:57
  • On the Translate Interface screen, in the Limit search to select list, choose Node types. Then filter. The content types should appear. Are they translated properly? May 10, 2012 at 9:00
  • I enabled this module but content type name in /admin/content not translated, by enabling this module we can translate content not content type name in admin pages !!!
    – Yuseferi
    Oct 25, 2013 at 14:14
4

Note that admin/structure/types always displays untranslated node type and description whereas node/add displays translated node type and description.

Your screenshot shows that you have translated the node type name correctly. Another, maybe more convienient place would be at admin/structure/types/manage/news/translate.

Multilingual content must be enabled, like Patrick Kenny said.

2
  • I have the same problem the content type name not translate :(
    – Yuseferi
    Oct 27, 2013 at 12:53
  • I actually don't have that problem, I was just pointing out how it works :) Oct 27, 2013 at 16:01