Is it possible to disable translation for forum topic for example?
If user sets "English" locale for forum topic it may not be visible while using non English language.
Is it possible to disable translation for forum topic for example?
If user sets "English" locale for forum topic it may not be visible while using non English language.
Comments
Comment #1
Roberto Gerola commentedPerhaps it is possible.
It depends if in the SQL code used by forum module
there is something that we can use to understand
that the call is coming from the forum module and
in case discarding the localizer changes.
A similar behavior is already been implemented for
gsitemap module, so I think it could be possible.
Comment #2
altshuler commentedThanks for answer.
i18n module has such functionality - it is possible to disable/enable translation for any content type.
By diasbling translation for given content type all content must be created with "Any" language.
Language selection field must disappear.
Comment #3
restyler commentedI'm not an expert in db query rewriting, so I just inserted arg() check in localizer module to disable node translation for my project ( http://drupal.org/node/115344 ) . (append this code in localizernode_db_rewrite_sql(): )
before
It is a quick and dirty solution, but it works.
Comment #4
Roberto Gerola commentedIt can work but it is a bit dangerous as generic solution.
If someone has a simple alias "forum" on his website it
stops localizer working if that page is a contents list.
I think it is better to implement a solution like
the one adopted for gsitemap and add an option to activate
or disactivate the support for forum module.
Comment #5
Roberto Gerola commentedJust uploaded on a CVS, if someone would like to make some test.
You can activate / deactivate forum sopport under localizer settings
Comment #6
ray007 commentedHaven't yet tested it, but maybe an additional setting in the "edit content type" form would be better.
It would allow us to use the feature for any node type ...
Comment #7
Roberto Gerola commented> an additional setting in the "edit content type" form would be better
You mean, not under localizer settings form ?
I would prefer to keep all the options for the module in one place.
For me wouldn't have sense an option to activate / deactivate localizer
support for page or history, but perhaps someone has some use cases
where these behaviors are necessary ?
Let me know.
Comment #8
ray007 commentedIf you want to do it under admin/settings/localizer, you have to code specifically for each content-type you want to provide this options for, or query the content types and provide a checkbox for each of them.
Since it is a content-type specific setting, i thought of doing a form-alter for admin/content/types/* and provide an option there to change behavior from default.
I.e. maybe one doesn't want to translate groups, or blog entries, or ...
Then store the setting in a variable "localizer_content_" or something like that.
Best: go both ways, should be easy if we have a localizer_set_variable() function for the backend ;-)
Comment #9
WayFarer80 commentedI need to turn locale for off my specific node type...
So, this is good idea to make 'locale disable' function in both places,
under 'edit content type'
(like i18n) and under localizer settings.
Comment #10
sunComment #11
(not verified) commented