Sorry for my English.
I want to add multilanguage tag to my website. Everything is ok. In below i add picture please look at this. But my method is not good.
First problem is Forexample "php" tag is same in every language. If tag is "student" this is different for other languages. Forexample in Turkish its "öğrenci". So if i want to count the php tags in posts i must use extra sql queries.
Second problem is in below i have 3 db tables. In adminstration tag fields i add error if not same amount of tag in each field because in tagslang table same tag_id for every language for one post. If i add 3 tag to one language but add 2 tag to other languages others last column is become empty.
Third problem is if url in site like "en/articles/tag/student" if i switch language url to turkish "tr/articles/tag/student" this is problem because there's no tag in turkish like student. But 2 tags have same tag_id. So if i change url "en/articles/tag/student" to "tr/articles/tag/ogrenci" this is also problem because maybe in other posts student tag has different turkish translation other than "ogrenci". So i must use limit 1.
db table tag has -> tag_id
db table taglangs has -> id,tag_id,language,name
db table tagassign has -> class(means Post model class), post_id, tag_id
Maybe some other problems. But i think adding tag to post in multilanguage site is different than my method.
Aucun commentaire:
Enregistrer un commentaire