Hi all,

In user profile, I can see the headers of story with little mark in [] (for example, [story]). I try localize it, but I can't do this, because code $title = l($nsub->title, 'node/'. $nsub->nid) . " [".$nsub->type."]"; don't have t() function.

Can somebody help me?

Comments

dziemecki’s picture

Not sure I'm understandig this. You want to translate titles or node type names?

dicreat’s picture

I try translate node type names (sorry for my bad english).

dziemecki’s picture

Don't appologize for your English. I'm sure I'm worse at whatever you usually speak.

Being an English speaker, I don't work much with translation, but you probable need to try something like this:

[".$nsub->type."]
becomes
[".t($nsub->type)."]

And, of course, you'll need to make sure there are translations for this in your localization file.

Not sure if that will work but if you can confirm it does, I'll implement it in the main branch.

dicreat’s picture

Thankyou! It's help.

dziemecki’s picture

Assigned: Unassigned » dziemecki
Status: Active » Fixed

Added to core code and committed.

dziemecki’s picture

Status: Fixed » Closed (fixed)