0
데이터베이스의 사용자 정의 테이블에 국가를 추가 할 수있는 사용자 정의 모듈을 작성 중입니다. 나중에 더 많이 할 것입니다.하지만 처음에 붙어서, 나는 계속할 수 없습니다.드루팔 (Drupal 7 : 사용자 정의 컨텐츠 번역 가능)
이function partners_schema()
{
$schema['partners_country'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'auto inc id of country',
'type' => 'serial',
'not null' => true,
),
'name' => array(
'description' => 'name of country',
'type' => 'varchar',
'length' => '255',
'not null' => true,
'translatable' => true,
),
'needDistributor' => array(
'description' => 'is a distributor needed',
'type' => 'int',
'size' => 'tiny',
'not null' => true,
),
),
'primary key' => array('id'),
);
return $schema;
}
위의 코드는 내 데이터베이스 테이블을 생성 코드의 내 조각
첫째. 검색을 한 후 'translatable' => true
을 내 스키마에 추가 할 수 있다는 것을 발견 했으므로 Drupal은이 필드가 번역 가능한 컨텐츠라는 것을 알고 있습니다.
양식을 추가하여 해당 스키마에 데이터를 삽입했지만 이제 막 달라 붙었습니다. 사용자가 열 name
을 번역 할 수 있어야합니까?
도움 주셔서 감사합니다.
그래서 핵심에 있지만 아직 아무것도하지 않습니다. –