Jump to content

Any Suggestions Of Langauges To Build A Multilingual Dictionary?


infinity86

Recommended Posts

You'll probably want to store your data in a database rather than a flat file. The DB will use built-in indexing methods to speed up the search.But first, you'd better design your user interface, the HTML portion. Just the bare bones (don't worry about CSS yet), but you should have an excellent idea about inputs and outputs. Knowing that will help you design the database itself.

Link to comment
Share on other sites

That's pretty vague. How does one build a dictionary from scratch? Don't you need a list of words and definitions first? Do you have any more details about what you're trying to do?
Thanks justsomeguy appreciate it...well i kind of started writing words and the definitions and saved it as a text file, other than that im lost and don't have any clue of what to do next.The dictionary would have a search box where a user can search for a particular word as well as listing all the words and their translation alphabetically ofcourse.
Link to comment
Share on other sites

OK, that's a pretty basic database application then. It sounds like you really only need 1 table for the definitions, 1 table for users (if you want to be able to log in and add new words), and a third table if you want to link multiple languages together. So the definition table could contain English definitions and words, and the third table would contain a translated word and link to the English word.The word table should have 1 column that is an auto-increment column for an ID, then a column for the word (a varchar column), then a text column for the definition. The translation table would need an auto-increment ID, varchar word column, a column to say which language it's in, and an integer column to hold the ID number of the English word that is the translation.Have you worked with databases before? If you haven't you'll want to read through the database tutorials on the w3schools site, about how to select and insert data. Other than that, most of the application is designing the form to add words, the search form, etc.

Link to comment
Share on other sites

OK, that's a pretty basic database application then. It sounds like you really only need 1 table for the definitions, 1 table for users (if you want to be able to log in and add new words), and a third table if you want to link multiple languages together. So the definition table could contain English definitions and words, and the third table would contain a translated word and link to the English word.The word table should have 1 column that is an auto-increment column for an ID, then a column for the word (a varchar column), then a text column for the definition. The translation table would need an auto-increment ID, varchar word column, a column to say which language it's in, and an integer column to hold the ID number of the English word that is the translation.Have you worked with databases before? If you haven't you'll want to read through the database tutorials on the w3schools site, about how to select and insert data. Other than that, most of the application is designing the form to add words, the search form, etc.
It sounds quite simple then... :)I have worked with Databases before and have quite a good knowledge on the use of MYSQL, but im not sure whether it supports Arabic language as my dictionary is based on translating English words into Arabic.
Link to comment
Share on other sites

Set the Character Encoding to UTF-8 and you should not have a problem with multiple languages in the same Database.
How do you set the character encoding to UTF_8? and does it support farsi/arabic language?i tried this but came up with an error shown below... create table dari( -> d_id int(5)NOT NULL auto_increment, -> id int(5) NOT NULL, -> word varchar(100), -> def varchar(100), -> PRIMARY KEY (d_id), -> FOREIGN KEY (id) references englishwords(id) -> ) -> ENGINE=MyISAM DEFAULT CHARSET=utf8 CLLATE=utf8_persian_ci;ERROR 1064: You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CHARSET=utf8 CLLATE=utf8_persian_ci' at line 9
Link to comment
Share on other sites

Leave out the foreign key constraints. MyISAM tables do not support foreign key constraints currently. It's not going to cause an error, it's just going to be ignored, but at least remove it from the query so we know it's not the problem.

create table dari(d_id int(5) NOT NULL auto_increment,id int(5) NOT NULL,word varchar(100),def varchar(100),PRIMARY KEY (d_id))ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;

http://dev.mysql.com/doc/refman/5.1/en/ans...reign-keys.html

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...