Translation relationships

Archived from the Xataface Users forum.

iliakros — Mon Jan 04, 2010 8:31 am

Hello

The translation of my relationship is not working

I’am translating LCMS and am using xataface 1.1.5r2

my code:

conf.ini

Code: Select all
[languages] en=English nl=Nederlands

relationships.ini from the pages table

Code: Select all
[menu] __sql__ = "select * from menu m inner join page_menu pm on m.id=pm.menuid where pm.pageid='$id'" action:label = "webmenu" action:description = "Kies een menu voor de pagina"

nl.ini

Code: Select all
;tables.pages.relationships.menu.action.label = "label menu" ;tables.pages.relationships.menu.action.description = "alt-tekst menu" actions.menu.label = "label menu" actions.menu.description = "label menu"

What am i doing wrong?

Many thanks


shannah — Mon Jan 04, 2010 3:49 pm

I’m not clear on what exactly you are trying to translate. Are you trying to translate the label for your relationship that appears in the record tabs?


iliakros — Tue Jan 05, 2010 5:28 am

When you go to edit record, you see tabs like edit, history and the tabs of the relationships, I want to translate these names of the relationships.

At the moment the name and alt-text are taken from relationships.ini

action:label = “webmenu”
action:description = “Kies een menu voor de pagina”

I hope you can help


shannah — Tue Jan 05, 2010 10:51 am

I believe the keys you are looking for are:

Code: Select all
tables.TABLENAME.relationships.RELATIONSHIPNAME.label and tables.TABLENAME.relationships.RELATIONSHIPNAME.description

(in your language ini file).

-Steve


iliakros — Wed Jan 06, 2010 1:33 am

Still not working

my nl.ini

Code: Select all
tables.pages.relationships.menu.label = "label menu" tables.pages.relationships.menu.description = "alt-tekst menu"

relationships.ini which is located in the pages folder

Code: Select all
[menu] __sql__ = "select * from menu m inner join page_menu pm on m.id=pm.menuid where pm.pageid='$id'" action:label = "webmenu" action:description = "Kies een menu voor de pagina"

So my relationshipname is menu and my tablename is pages. Is that correct?

I also tried

Code: Select all
tables.pages.relationships.menu.action.label = "label menu" tables.pages.relationships.menu.action.description = "alt-tekst menu"

But none is working. I am still seeing the label and description of the relationships.ini file.

Please, what am I doing wrong


shannah — Wed Jan 06, 2010 1:42 am

Sorry,

The instructions I gave you work for 1.2.2. If you replace your Dataface_Table::getRelationshipsAsActions() method with the one in SVN (http://weblite.ca/svn/dataface/core/tru … /Table.php), then it should work.

-Steve


iliakros — Wed Jan 06, 2010 5:13 am

It works

Thank you