Abdelrhman

EPS Consultancy: Multilingual Support and Mail System
0 Views

EPS Consultancy: Multilingual Support and Mail System

Added five-language routing, Arabic RTL support, and protected SMTP delivery to existing contact and careers forms.

Project Overview

EPS Consultancy is an existing client website. My contribution was the multilingual system and the mail pipeline for its contact and careers forms. The work lets visitors read the existing pages in their preferred language and submit enquiries or applications through the site's shared hosting environment.

The problem

The site needed language routing without duplicating page templates. Arabic also needed right-to-left layout. Its forms needed dependable SMTP delivery and server-side checks for ordinary enquiries and CV attachments. Because this was a focused change on shared hosting, PHP fit the existing deployment.

Key features

  • The language system serves English, German, Arabic, Hindi, and Russian.
  • Localized routes select the matching translation set and use English text when a translated key is missing.
  • Arabic pages set the document direction to right-to-left.
  • The contact form validates submissions and sends a formatted HTML and plain-text message through SMTP.
  • The careers form validates applicant fields and attaches an accepted CV file to its SMTP message.
  • Form errors return to the page with the entered values retained.
  • Both forms use a CSRF token, same-origin request checks, and a hidden spam field.
  • A file-backed rate limiter limits submissions across individual visitors and the site as a whole.

Technical architecture

The existing PHP front controller routes language-prefixed pages to shared view templates. I added translation bundles as PHP arrays and a lookup layer that merges the selected language over English defaults. The shared layout sets the page language and direction. Contact and careers POST handlers pass input through a form guard and validators before calling a PHPMailer wrapper configured for SMTP. The careers handler checks the uploaded file's size, extension, and detected MIME type before attachment. Rate-limit counters are JSON files on disk, updated under an exclusive file lock.

Engineering highlights

  • CSRF comparison uses a constant-time function. Origin and referrer checks reject submissions from a different site.
  • A hidden field traps basic form spam, while per-visitor and global limits constrain repeated requests.
  • The flat-file limiter uses locking to keep counters consistent when requests arrive together.
  • Output translation helpers escape HTML and permit only selected formatting tags.
  • The mail flow reports delivery failure without treating an unsent form as a successful submission.

My role

I modified the existing client site to add language selection, translated content handling, Arabic direction, and the contact and careers mail pipeline.

Image Gallery

1 / 2

Client Reviews

Feedback from people who used or collaborated on this project.

Share your experience with this project