# Hausa to English Translator
A web app for translating Hausa words and sentences into English, built with
PHP, MySQL, HTML, CSS, and JavaScript.
## Features
- **Public translator** — anyone can type a Hausa word or sentence and get an
instant English translation, and browse/search the dictionary.
- **Admin account** (username `admin`, password `admin`) — logs in to upload
the Excel/CSV dataset once (stored permanently in MySQL), view every entry,
delete entries, and see a list of contributors.
- **Contributor accounts** — anyone can sign up, log in, and add new Hausa
words with their English meaning. Every word they add is saved permanently
under their account, so their contribution history is always there when
they log back in.
- A small original emblem (sun/star burst with two interlacing threads) is
used as the site's logo, symbolizing two languages being woven together.
## Requirements
- PHP 8.0+ with the `pdo_mysql` and `zip` extensions enabled (both are on by
default in most PHP installs / XAMPP / WAMP).
- MySQL or MariaDB.
## Setup
1. **Create the database.**
Import `database/schema.sql` — e.g. in phpMyAdmin, or from a terminal:
```
mysql -u root -p < database/schema.sql
```
2. **Set your database credentials.**
Open `config.php` and update `DB_HOST`, `DB_USER`, and `DB_PASS` if they're
different from the defaults (`localhost` / `root` / empty password).
3. **Create the admin account.**
Visit `setup/create_admin.php` once in your browser (or run it with
`php setup/create_admin.php` from the command line). This creates the
admin account with a securely hashed password. **Delete this file
afterwards** so no one else can run it again.
4. **Serve the project from your web root.**
The app assumes it's reachable at your domain's root (links like
`/index.html`, `/admin/dashboard.php` are root-relative). If you're using
XAMPP/WAMP, put the folder inside `htdocs`/`www` and browse to
`
localhost`, or point your virtual host / web
serv …