有谁知道我如何在教义上与许多人建立关系,但以这种特殊的方式:
在我的主表中,我有一些字段,几乎没有一个是可以翻译的字段
Table1:
table_id <- primary key
numeric_field1
numeric_field1
numeric_field3
现在在我的 Table1_translations 我有所有可以翻译的字段
Table2:
table_id <- primary key along with language
language <- this contains 2 letters representing which language is being stored in this row
string_field1
string_field2
string_field3
我对如何用 YAML 表示这个有一个简单的想法,但我的问题是,我怎样才能检索这些数据?
Table1:
table_id numeric_field1 numeric_field2 numeric_field3
1 123 321 415
Table2
table_id language string_field1 string_field2 string_field3
1 en hello happy world
1 es hola feliz mundo
因此,对于 table_id=1 的行,我在 table2 中有 2 行,它们对应于不同语言(en & es)的字符串,我试图管理某种本地化但在数据库上,因为这些可能是文本
提前致谢 :)