Hướng dẫn code multi language trong php mysql
Ứng dụng đã cơ bản hoàn thành. Chỉ còn viết sự kiện cho các button để thay đổi ngôn ngữ là xong: protected void ibtEnglish_Click(object sender, ImageClickEventArgs e) { Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); LoadString(Thread.CurrentThread.CurrentCulture); } protected void ibtVietNamese_Click(object sender, ImageClickEventArgs e) { Thread.CurrentThread.CurrentCulture = new CultureInfo("vi-VN"); LoadString(Thread.CurrentThread.CurrentCulture); } Trên đây chỉ là ứng dụng rất cơ bản và đơn giản với mục đích để giới thiệu là chính. Hy vọng các bạn sẽ nghiên cứu chuyên sâu hơn để có thể áp dụng vào thực tế. To make your site extensible and easy to support future, additional languages; I’d suggest using MySQL in its intended fashion and create a relational schema. If you have topics, and topic titles are to be translatable, then you’ll need three tables: a Your topics table is easy: you just need a primary key, and any other language-independent columns (such as Finally, your join table (could be called For example, if English is language ID 1 and French is language ID 2, then your table could look as follows:
As you can see, a topic can have multiple rows in this table, with a record per language to offer up the translations. I know this maybe doesn’t exactly answer your question, but should set you on the right path on how best to store your data. Languages can easily be added in the future without needing to modify your database schema.
|
i | i^i | $i | ”.pow($i,$i).” | n”; } ?>
---|
Gia tri a | Tinh 2ª |
{block.GIATRI} | {block.KETQUA} |