Jump to content

Setting translated title


thomas.isberg
 Share

Recommended Posts

Hi!

I have multi language all set up and working with multi language fields and two languages: default and english.

Everything's working, but when I create a new Page and try to set title and title_english, only title is stored. The english version comes in blank. Here's what I do:


$item = new Page();
$item->template = $this->templates->get("page_complex");
$item->parent = $page->id;
$item->title = "Kommande matcher";
$item->title_english = "Upcoming fights";

$item->save();

Any ideas anyone?

Thank you Ryan & all for this wonderful CMS!!!

Cheers,

/ Thomas

Link to comment
Share on other sites

Thomas, just to confirm, you are using language alternate fields, where you have literally created a field called title_english in your Setup > Fields? The syntax you mentioned would only work if you were using language alternate fields, as opposed to a multi-language text or title field. I am guessing that there might not be a literal title_english field in your fields list and that you are using the language-alternate syntax on multi-language title field? If that's the case, see here for the correct syntax. If that's not the case, let me know and we can try something else.

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

×
×
  • Create New...