This question may be opinion based and can have different answers. However, I can provide you an idea how I implemented Language Selection feature on different websites. In this case I will only talk about the change required in Sitecore CMS.
Instead of using the Languages from /sitecore/system/Languages
, you can create a container item under each site named Language Selector. That particular container will hold the list of languages being supported by the website.
For example, the Facebook and Twitter site Language Selector containers will hold the 7 language each and Sample Site will hold the 25 languages. Please see screenshot below

The items en, fr-FR, de-DE etc is based on a template that you will create which will contain a field as droplist with datasource set to /sitecore/system/Languages
Now, you can even extend this further. Since you have sites having same languages, you can have a global language selector container which will hold shared languages
How it looks?

When using a droplist, it will be specific to this item and it allows you to add other fields such as Flag, Name etc.
You can use a multilist also where you will select all the languages necessary for a site. Then you will have only 1 item to manage.
UPDATE 1
Previously, if I am not mistaken, you were retrieving the list of languages for Facebook, Twitter and Sample from the path /sitecore/system/Languages
.
In this implementation, firstly, you need to have a Language Container which will hold languages that are specific to the site. Note that the Language Container and Language item are customs one.
In other words, you need to create a template named Language Info where you will have a drop-list field type at minimum. The drop-list will have a datasource pointing to the path /sitecore/system/languages
. You may add other fields if you want such as Language Flag etc. The Language Container template is an item that will hold the Language Info. So you can configure multiple languages under the Language Container.
In your backend implementation, you will need to retrieve the languages from the path /sitecore/content/[Sitename]/Language Container
(depending on where you created the Language Container). This means that when you will configure for each site the different languages, when querying the Language Container, you will have languages specific to this site instead of the whole list of languages from the system path.

If you want to have the Shared Language Container, you will need to perform the query as follows:
- Query path
/sitecore/content/[Sitename]/Language Container
- Query path
/sitecore/content/Shared Language Container
- Merge the 2 lists together
P.S: I don't have the specific code but the above helps on how the content tree looks like and based on this, you can easily adapt the code.