I just enabled the translation module and the i18n module. One of my content types has a node reference field, and after translating the page, the node reference dropdown is empty. It works fine for English (default lang) but no other languages.
nodereference will only refer to nodes of the same language. You must create nodes in the other languages in order to make them accessible to your field.
Related
I'm currently setting my Drupal 7 site up in an additional language using the i18n and variable translation.
My problem is that I cannot update the title of the blog page or the URL alias when I switch to the version for the other language. When I switch language my posts are translated but I cannot find where to change the titles of the page or the URL alias.
I'd like the routes to look something like this:
mydomain.com/news
mydomain.com/es/noticias
There are different kind of translations supported in Drupal. By default translation is made buy matching nodes in different languages togheter. And adding new translation actually means making new node and matching it with rest marked together.
But also you can translate fields. So in this case you don't have different nodes, but field values are translated. And if I remember well you can't translate all fields, i.e. you can't translate title and path since it's one node. Is this a case?
Update:
You would need to add "title" module:
https://www.drupal.org/project/title
Check out please this article:
https://www.drupal.org/node/1280910
I am having a issue in Flag_list module, can anyone please help me out how to put a flag list and how to view it please?
The module has very good description how to do it : http://drupal.org/project/flag_lists
How to use:
Install as usual.
At admin/build/flags you will see a flag "fl_template." This is a default template flag provided by flag_lists. You can edit it to make changes to list messages and to assign it to node types. This
template will be used only on types you assign.
You can create new templates here: admin/build/flags/lists/template and apply them to other node types.
A template can be assiged to many node types, but a node type can only have one template assigned to it.
Enable the "list" block so that it is displayed on your content. The block will only be visible if the content is listable and the user has permission to create lists. That is, the node type must be assigned a template, or the block won't appear. Further, you should enable the link to create lists in the block's config.
Create new lists using the link in the block.
See your lists and listed content at user/[uid]/flags/lists
I have a multi-language website.
I want a module to add multiple version of my nodes and selecting the right one for each language of my website.
In other terms, for each node, I want to have more versions, a version for each language. I don't want to create new nodes, in order to avoid confusion for my customer.
I want to be able to fill the content for each language version of the same node.
If I'm not wrong, the core module Content Translation allows me to select for each node to which language interface belongs to, which is not what I want.
I saw the internationalization module, and it is good for translating taxonomy terms, and blocks, but it doesn't provide the functionality I want (multiple versions of each node).
thanks
Drupal.org has a lot of documentation related to multilingual sites.
http://drupal.org/node/324602
You may find that the Internationalization module will help you out. See this tutorial on setting up multilingual site using the Internationalization module.
#Patrick: CCK Translation makes it possible to have the labels and description of your CCK fields translated to different languages. The content that's stored inside those fields gets translated for the entire node, including all its fields using i18n module.
Hey! Thanks for reading my tutorial.
To properly translate CCK labels:
1 - activate CCK Translation module
2 - write the labels for your CCK fields in english
3 - Go to the "create new node" page. You're doing this to force Drupal to use the labels you just created. Visit the "create node" page in all your languages, so you force Drupal to try to show you the label in all the languages you have configured.
I know, this step is weird.
4 - Go to Admin -> Translate Interface (/admin/build/translate). Click on "search". Search your label in english, you'll see it appears several times, but marked as untranslated. Click on 'edit' for every string and translate them.
A bit clunky, but it works.
Node reference fields in Drupal are displayed as lists by default. Is there a way to change that?
I'd like to output them as JSON so I can create a fancy JavaScript visualization.
You can modify it in 2 ways: via custom module with function hook_form_alter or via theming (preprocessing form or templating form).
http://api.drupal.org/api/function/hook_form_alter/6
http://www.lullabot.com/articles/modifying-forms-drupal-5-and-6
For AHAH: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#ahah
Also, nodereference already have little ahah: "autocomplete" in field editing of custom node type.
Consider the Content Templates (Contemplate) module. Here is a quote about it (from the module's project page):
... allows modification of Drupal's teaser and body fields using administrator defined templates. These templates use PHP code and all of the node object variables are available for use in the template. An example node object is displayed and it is as simple as clicking on its properties to add them to the current template.
This module was written to solve a need with the Content Construction Kit (CCK), where it had a tendency toward outputting content in a not-very-pretty way. And as such, it dovetails nicely with CCK, adding a "template" tab to CCK content-type editing pages and pre-populating the templates with CCK's default layout. This makes it easy to rearrange fields, output different fields for teaser and body, remove the field title headers, output fields wrapped for use with tabs.module (part of JSTools), or anything you need.
But Content Template can actually be used on any node type and allows modification of the teaser and body properties before they go out in an RSS feed, search index, or are handed off to the theme. Additionally, ConTemplate can choose to add any files, images, or other media to RSS feeds as an attachment.
Templates are normally stored in the database but it is also possible to create disk-based templates which live in your sites directory and can be inherited across multisite installations in the same way as themes or modules.
Try the Custom Formatters module, simply make a custom formatter to render the node out exactly how you want it, then output the formatter to code or to a Feature for deployment.
Does the CCK api allow me to create a node type, from a custom module, with a bunch of fields that use CCK to store their state? If so can these fields be locked so that users may not alter them, but still allow the user to add more fields to the node type?
Thanks
I think the answer to your first question is "yes" (for Drupal 6, at least, which has elements of the CCK integrated into Drupal Core). I believe the Amazon module does this sort of thing, albeit it with just one field.
I don't think the idea in your second request is achievable, though. This would seem to require field-level permissions' control whilst Drupal only supports module-level permissions' control.
You could add validation code in the GUI which restricts CCK fields being interfered with on your content type. This would not prevent another module getting in there with an axe, though.
You could add checks which restore your preferred CCK settings whenever they detect some unwanted changes.