Page 1 of 1

Translation relationships

PostPosted: Mon Jan 04, 2010 8:31 am
by iliakros
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

Re: Translation relationships

PostPosted: Mon Jan 04, 2010 3:49 pm
by shannah
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?

Re: Translation relationships

PostPosted: Tue Jan 05, 2010 5:28 am
by iliakros
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

Re: Translation relationships

PostPosted: Tue Jan 05, 2010 10:51 am
by shannah
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

Re: Translation relationships

PostPosted: Wed Jan 06, 2010 1:33 am
by iliakros
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

Re: Translation relationships

PostPosted: Wed Jan 06, 2010 1:42 am
by shannah
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

Re: Translation relationships

PostPosted: Wed Jan 06, 2010 5:13 am
by iliakros
It works

Thank you