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: Display phrase in language other than the current one

Status Resolved
Add-on / Version Publisher 1.6.5
Severity
EE Version 2.10.1

Linus Design

Aug 03, 2015

Sorry, another issue I’m afraid! Not sure if this one’s a bug or just something that Publisher doesn’t do out of the box.

I’m trying to display a phrase in a language other than the user’s selected one. (I’m checking their location with some PHP, so I can offer them a “Looks like you’re in X, would you like to visit our X site?” message. So while they might be looking at the site in German, if they’re in the UK I want that message to be in English.)

So I tried hard-coding the language for now, like this:

{exp:publisher:translate_phrase name="looks_like_youre_in" lang_id="1"}

but that seems to always return the phrase in the user’s current language, rather than in English. Is there another way to do this?

#1

BoldMinded (Brian)

I just did a test and confirmed that the tag does work with lang_id as a parameter. Are you sure your phrases have translations?

{exp:publisher:translate_phrase name=”language_en” lang_id=”2”} (lang_id 1 is my default language)

#2

Linus Design

Yes they definitely have translations. If you like I could send you login details?

#3

BoldMinded (Brian)

Not yet. Please setup a new clean environment with only Publisher installed and a single template and a couple of phrases to replicate the issue. If they are still not translating, provide a login to that site instead.

#4

Linus Design

Comment has been marked private.

#5

BoldMinded (Brian)

Comment has been marked private.

#6

Linus Design

Thanks for the new version – before install it though, I wanted to check: it seems to be Publisher Lite? Is that just the name of the folder it’s in (publisher-165-lite)? Or are the files basically the same for both?

#7

BoldMinded (Brian)

Comment has been marked private.

#8

Linus Design

Yes that last version works – thanks!

Login to reply