Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6697919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:31:01+00:00 2026-05-26T06:31:01+00:00

I am implementing language files for my PHP application. I am using constants to

  • 0

I am implementing language files for my PHP application. I am using constants to define each word that I want to have translation for. I put a folder in the root of my application with files like en.php, fr.php, de.php, it.php etc. The translations are for form elements and error messages to display in their respective language. The language can be selected by clicking on a flag on top of the page.

What I’m not sure about is if the language file that holds all the defined words should be a single file or broken down into many, so I can load just what I need for each page. My app is getting quite large and it seems like a bad idea to load a giant PHP file.

Having single files located in a single location makes loading them simple but I’m not sure if this is the way to do it.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:31:02+00:00Added an answer on May 26, 2026 at 6:31 am

    Well my suggestion would be use the divide and conquer approach obviously if you can achieve such a modularity that you are including only page/request specific language files than it would improve the response time

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which is the best way of implementing a language translation for mutli -lang site.
What all language components will have to be used for implementing an email service
implementing publishActivity in PHP using the REST API using this code: $activity = array(
I've looked high and low for examples of implementing a language using the RPython
We are implementing i18n using JSTL and encountered an issue that the resource texts
I have a code that parses some template files and when it finds a
We are not using GKPeerPicker control. We are implementing custom UI. We have done
I'm implementing a dynamic language that will compile to C#, and it's implementing its
I am working on a huge php application with Zend framework, in that project
A couple of days ago, I read a blog entry ( http://ayende.com/Blog/archive/2008/09/08/Implementing-generic-natural-language-DSL.aspx ) where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.