Translation: Translatable grid or field assigned to pagetype
Created 7 years ago by william

I am developing a website that should exist in two language versions. Since i am able to choose translatable in different areas, i wonder where i actually should do it. Or everywhere?

On my homepage, i am using a grid. I am able to set the grid when creating it to translatable. I am also able to set fields assigned to the grid as translatable. I am also able to set the field translatable when i assign it to my pagetype.

What is the right strategy here? Since translatable exist on different places, where is it important to set it? Do i have to set on all three places (grid, fields assigned to grid, and field assigned to pagetype)? I find this a bit confusing.

william  —  7 years ago

I did set everything translatable. And ran into this error, when i tried saving the page using my grid:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'homepage_project_image_data' in 'field list' (SQL: update `xxxxxx_grid_homepage_project_translations` set `homepage_project_image_id` = , `homepage_project_image_data` = , `updated_at` = 2017-02-26 20:36:24 where `id` = 1)
william  —  7 years ago

@ryanthompson This thing caused a lot of problems for me so i filed two issues for you on github:

Translation problems Saving page : mb_strtolower() expects parameter 1 to be string

ryanthompson  —  7 years ago

This will help prevent this in the future - null was accounted for but not false: https://github.com/anomalylabs/streams-platform/commit/671ac8aee12767b0e5058b169a5f0b321beffb80

The grid itself is not translatable. Nor is any field that relies on a pivot table for it's relation.

william  —  7 years ago

@ryanthompson Thanks. I think i found a new issue having to do a little with this. Filed it here: https://github.com/pyrocms/pyrocms/issues/4168