Jump to content

One language file Vs multiple language files - Which is better?


Recommended Posts

Hi there,

I am working on a project and one of my client's requirements is to have his web site viewed in multiple languages. I know how to do that but I am just wondering which going to be better...One file for each language Vs multiple files

 

 

Option #1: One file that include everything

Language folder:

Languages => English.php

                        French.php

                 

Options # 2: Multiple files for each part of the site 

Language folder:

Languages => English => Admin.php

                                    => Main.php

                                    => Register.php

 

                  => French => Admin.php

                                    => Main.php

                                    => Register.php

 

I need to know which option is better and why? which is better in term of performance, memory consumption, maintenance, readability and so on 

 

appreciate your advice and help

 

regards

 

I think it really depends on how large the site is and how it's organized. If the site isn't that big then a single file probably makes sense. If the site is large and can be broken down into logical sections, or the site is expected to grow quite large, then multiple files or language sets for each sections probably makes sense.

 

I'm working on a project now where the site is broken into multiple logical modules, and each module has its own language set associated with it. But I still have a main language set that is included on each page for common stuff that I expect to be on each page. This makes it much easier to find what I need to change for wording on the site, so maintaining/readability was easier than a monolithic file. Can't speak much on the performance and memory consumption though.

I would go with multiple language files.

 

One language file would (I imagine) get HUGE over time, if you were to improve or modify the site.

 

If you were to try and split that file, it would be very tedious, so to start structured at the start works great.

  • 3 weeks later...
  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.