Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Translating Categories

Status Resolved
Add-on / Version Publisher
Severity Trivial
EE Version

GIGA

Apr 23, 2013

Hello.

Im using exp:channel:categories to display all the channel categories in the sidebar of the website.

{exp:channel:categories channel="noticias" style="nested" class="side-nav"}
<a href="{path='noticias/show'}">{category_name}</a>
{/exp:channel:categories}

I have already created translation for them in Publisher/Categories.

How can i see the translation, switching the language don’t affect.

 

#1

BoldMinded (Brian)

Hrm, it should be translated. You can also try the {exp:publisher:translate_category} tag inside of that tag loop.

http://boldminded.com/add-ons/publisher/template-tags

I’ll take a look at this soon though to verify the categories tag is still working.

#2

Dimitri Neufeld

Hi, i deleted the browser cashes and works now. thanks.

#3

Dimitri Neufeld

Another question related to categories:

in the entry view i want show category name for that entry

{exp:channel:entries channel="noticias" limit="1"}
{categories}
<h3>{category_name}</h3>
{/categories}

everything i try it doesn’t translating.

the tag {exp:publisher:translate_category} translating correctly but only with predefined cat_id=”1” tag. How can i automatically show translated Category title for each entry using translate_category tag?

#4

BoldMinded (Brian)

So you’re saying if you use {exp:publisher:translate_category cat_id=”{category_id}”} it only works if the id is 1? 2, 3, 4 etc don’t work?

#5

Dimitri Neufeld

Yep it does with all 1,2,3,4 etc

The question is how to generate automatically the Category Title in my template for each entry.

In my case i got different Categories. If i open an entry i want to show the Category Title assigned to that entry.

For example if i use {exp:publisher:translate_category cat_id=”1” return=”cat_name”}

All the entries always showing the same Category title - “News”.

#6

BoldMinded (Brian)

I’m confused. Can you provide more context and show more of the template? Or provide CP access so I can see the template code being used and see the page in action.

#7

Dimitri Neufeld

Sorry for beeng not clear, i’m newbie in ExpressionEngine.

Please open:

  1. http://cliente.gigamedios.net/afi/index.php/noticias/show/categoria/noticias-financieras

  2. Click through menu on the right side : CATEGORIES

  3. The Category Title (at the bottom of the logo) dost translating, shows in spanish language, must be English


In my template im using to display the Category Title with this code:

{exp:channel:category_heading channel=”noticias”} <h3>{category_name}</h3> {/exp:channel:category_heading}

#8

BoldMinded (Brian)

Forgive me, but I’m still not following. It looks like everything on that page is in Spanish, but you want that header to be in English? https://www.evernote.com/shard/s9/sh/59559bcb-5cbd-4196-bac9-51c742221d89/b42bc356c47a04beddb534b2e47e6730

#9

Dimitri Neufeld

you can switch the language from HOME > then go to NEWS (link in the top navigation)

now click on some of the Categories in the Right menu.

Exactly this title in your screenshoot must be English.

#10

BoldMinded (Brian)

I see other content in Spanish still as well. Are you positive the content was entered correctly?

Would you be able to provide FTP access to this site to I can step through some code?

#11

Dimitri Neufeld

The language switcher you can find in the top navigation in the right corner.

https://docs.google.com/a/gigamedios.com/file/d/0B7qZOqhCjoZ8ZkV1RFRZaUxDVlU/edit

Its only working from the HOME Page, in the another sites is not working. I dont know why. I use {exp:publisher:switcher style=“links”} and some javasript and embed it inside of {embed=”includes/menu”} in my template. Maybe you have any tip for me how to fix it.


Please remove this access information from public view as soon as you get it.

Thanks

#12

Brian Litzinger

I’ll take a look at it this weekend. Can you click the Edit Ticket button at the top and add the credentials there. You had it posted in the comment, which is public. You might want to change the passwords.

#13

BoldMinded (Brian)

You need to re-add the credentials by editing the ticket, sorry. I didn’t save them anywhere else.

#14

Dimitri Neufeld

Ok i could fix the language switcher so far, the Categories are still not translating for me, everything else works great.

http://cliente.gigamedios.net/afi/index.php/noticias/show/categoria/noticias-financieras

“Noticias Financieras” must be “Financial News” etc by switching the language to English.

#15

BoldMinded (Brian)

GIGA, I need to edit your comment again b/c you should edit the ticket and post the FTP info there, not in the comments field where it is public.

#16

BoldMinded (Brian)

To clarify, on a Spanish page you want the category title to still be in English?

#17

Dimitri Neufeld

Simple:

Spanish page > Category Title SPANISH English page > Category Title ENGLISH

#18

BoldMinded (Brian)

Thats what I thought, but a comment earlier made me think it was supposed to be the other way, which is why I was confused.

#19

BoldMinded (Brian)

Well, I haven’t figured out the fix yet, but I did find a temporary solution for you. I updated the show.html template to have this:

{exp:channel:category_heading channel="noticias"}
        {exp:publisher:translate_category cat_id="{category_id}" var_prefix="cat:"}
          <h3>{cat:cat_name}</h3>
        {/exp:publisher:translate_category}
     {/exp:channel:category_heading}

Which shows the correct heading.

#20

Dimitri Neufeld

Great! Thank you for your support. Looking forward to have this fix included in the next releases of your great software.

Login to reply