Jump to content

Translating name and description of a process module without affecting Modules list?


teppo
 Share

Recommended Posts

I'm trying to make one of my modules thoroughly multi-language-enabled and I'm kind of curious if (and how) others have solved this particular situation. What I'd like to see is that this Process module, which by default shows up under Setup page at Admin, had it's name and description on that page translated, but at the same time (for the sake of consistency) I'd prefer not to make it's name appear translated at Modules page.

My first idea was to make title and summary at getModuleInfo() translatable, which seems like an obvious solution, but it also makes module name appear translated at the Modules page. Perhaps it's just me, but I'd prefer to see modules listed with their original names there - not to mention that translated name not affecting sort order makes finding that particular module slightly more difficult.

Headline would probably be quite easy to translate without affecting anything else, since you can override it by setting processHeadline to whatever value you prefer. But that's only partial solution.

So, how do you guys usually approach this? Do you simply consider it OK that module name is translated even at Modules page? :)

Link to comment
Share on other sites

Your first solution is the only I see and it isn't possible to have display translated here but not there obviously. A process module is put where module put's in on install, it's not in setup always. If you put in in main navigation you can set a title via the admin page itself. The Setup page has the ProcessList module that lists them by module info title. So you would have to change that module. But I'm sure you know it already. ;)

  • Like 1
Link to comment
Share on other sites

@Soma: yeah, I did know that, but thanks anyway! :)

I've chosen to have this particular module install itself under Setup mainly because on it's own it's just one simple view which doesn't really deserve it's own "section" of Admin and Setup is most obvious place for modules like that. Your post did make me consider grouping it with several similar modules I have sort of planned to add later though.. but that's not happening anytime soon.

I guess I'm hoping for some kind of a divine intervention here - a solution that's so obvious that I've completely missed it ;)

Link to comment
Share on other sites

I guess I'm hoping for some kind of a divine intervention here - a solution that's so obvious that I've completely missed it ;)

Yeah I think so. Hook ProcessList::execute and replace it with your own.

And add fields to admin template for description or images :D

Link to comment
Share on other sites

Yeah I think so. Hook ProcessList::execute and replace it with your own.

Yeah, let's not go there, though it does sound tempting.. ;)

Guess I'll just have to settle with one slightly oddly named module at Module list. I can definitely live with that, especially since it means that I don't need to explain to clients why one of the features they're using has it's name in English when everything else around it is in Finnish :)

Link to comment
Share on other sites

Why not? If not that what do you have in mind. PW is done to do these things easily. If not that I don't know what else :D

Actually you can just create your own ProcessMyList.module (copy ProcessList.module) and then install it. Open admin page "Setup"... change the selected Process "ProcessList" to your "ProcessMyList".

Link to comment
Share on other sites

I think what soma is suggesting is good for single site, but not good in general, if all modules need to do that kind of stuff. I don't like that module titles get translated and best solution here would be to have little tweak on core for processlist.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...