ASP.Net / MySQL : Translating content into several languages

后端 未结 2 1880
执念已碎
执念已碎 2021-01-06 11:49

I have an ASP.Net website which uses a MySQL database for the back end. The website is an English e-commerce system, and we are looking at the possibility of translating it

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-06 12:11

    It's not good idea just to add new columns to existing table. It will be really hard to add a new language in the feature. The lookup table is much more better but I think you can have problem with performance because number of translated records.

    I think best solution is to have a shared table:

    products: id, categoryid, 
    

    and same tables for every language

    products_en, products_de: product_id (fk), title, price, description, ...
    

    You will just select from the shared one and join table with your language. The advantage is that you can localize even the price, category, ...

提交回复
热议问题