Jump to content

How to add new lang extension in language dropdown

Recommended Posts

Hello everyone, Hope you guys doing good. 

I came up with something new :17_heart_eyes: or maybe old :D .  I want to implement whmcs lang from English to Hindi. for my indian customers.  So i will convert each and every English Words to hindi words.  Already 50% done.  but please anyone tell me how to Add a extension ex- Hindi in header dropdown menu and target it to my Hindi lang File. 

Check the screenshot for more info,



So i have added a Hindi.php file in Lang directory but in dropdown its showing English 2 times.

Sorry for my Bad English.  Here is all. 


Bagful International


Share this post

Link to post
Share on other sites

Yes i did same.   i have created  one file name Hindi.php


Right now this file included english.php file data,  but in dropdown, there is showing two English lang selections.  



Share this post

Link to post
Share on other sites

one of the WHMCS guys, e.g @WHMCS John, @WHMCS Nate etc, may want to comment on this, but i'm not convinced the documentation on this is 100% correct (yes I was shocked too! :P)

  1. Begin by opening an existing language file, for example lang/english.php
  2. Save this file with a new name. The name you choose will be shown in the language selection dropdown menu inside WHMCS.

I don't think that's true for v6 or later that the language name is being taken from the filename - it's certainly true for v5.3.14 as i've just tested it, but failed on v6.2.2...


in v7.2.3, i'm seeing the same as @bagfuloz.


Each language file in WHMCS requires a locale to be defined in the following format:

$_LANG['locale'] = "en_GB";

The above defines that the language is English (en), and the region is Great Britain (GB).

The locale information is used by WHMCS to localise and display the language name localised to the native language within the WHMCS client area.

Failure to provide a valid locale will prevent the language file from showing up as available for use within WHMCS.

i'm not sure if any of that is valid in v7 - i've set the above variable to fr_FR in hindi.php and it's still showing en_GB in $locales (which is the array used for the localised name shown in the language menu) - on multiple browsers, with cleared browser and template caches... even if you totally remove the line from the file, the language file still works (contrary to what it says should happen in the docs)... it looks to me like $locales is hard-coded and not taking the locales from the language files. :?:

as also specified in the docs, both files are utf-8 encoded without BOM (though even with BOM it still works).

the only way I could think to fix this is to use a modified version of the hook I posted in the thread below...


* Change Hindi Language Localised Name
* @author brian!

function locales_hook($vars) {
	$mylocal = $vars['locales'];
	foreach ($mylocal as $key => $value) {
		if ($value["language"] == "hindi") {
			$mylocal[$key]["localisedName"] = "हिंदी";
	$activelocale = $vars['activeLocale'];
		if ($activelocale["language"] == "hindi") {
			$activelocale["localisedName"] = "हिंदी";
	return array("locales" => $mylocal, "activeLocale" => $activelocale);
add_hook("ClientAreaPage", 1, "locales_hook");


either the documentation is wrong, or this has been a bug since v6... or i'm missing something obvious as I assume users shouldn't need to use a hook to do something like this.. (though these days, any excuse WHMCS can find to require hooks to be used for the most trivial of things is seemingly enabled by default!) 9_9

Share this post

Link to post
Share on other sites
2 hours ago, brian! said:

I assume users shouldn't need to use a hook to do something like this.. (though these days, any excuse WHMCS can find to require hooks to be used for the most trivial of things is seemingly enabled by default!) 9_9

All roads do seem to be leading to that. I suppose I'd better learn how to use them better. ;)

Edited by bear

Share this post

Link to post
Share on other sites
2 hours ago, bagfuloz said:

i have created  one file name Hindi.php

it will have to be called hindi.php (lowercase - the docs seem to be correct on that part at least!)

Share this post

Link to post
Share on other sites

Whooo,  That's why i said, we are missing someone on this thread, and that was brian.

Yes, that provided doc, isnt much usefull.  HOPE, WHMCS guys will update it. 

 Its working buddy,  now i can continue my WHMCS hindi language journey.

Thanks  B & B (Bear & Brian)   :16_relieved:

Share this post

Link to post
Share on other sites

Guys,  there is one more issue. 

Hindi lang is selected from dropdown menu, and its working as should be. but But selected lang name still showing - English

check screenshot for more info.


Madan Malhotra


Edited by bagfuloz
Forgot Name

Share this post

Link to post
Share on other sites
5 hours ago, bagfuloz said:

Guys,  there is one more issue. 

take a look at the hook, I updated it yesterday when the same thing occurred to me... if you try the above hook again, it should work fine. :idea:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By oklomsy
      hey everyone i really need help so i want to  make a login page but its not free to register and you need to buy the premium plan license key to login so you login with the license key you get and you get access to everything but i dont know how so please help me, i did make a login form and a database and a user and it has to be on PHP, so if you want just give me the codes and instructions and i will do it  your help is very appreciated 
    • By ocastaned
      I just integrated the social login option within WHMCS, but those are being shown in English. This is a screenshot: http://prntscr.com/id8leb
      How can I make possible they are shown in Spanish language?
      Thank you.
    • By ModulesGarden
      Not so long ago you gave us some food for thought regarding the potential integration of WordPress tools with the WHMCS system. Now we are circling back to you to let you know that your ever-so-helpful feedback has laid the foundations for the very module we proudly present you with today - WordPress Manager For WHMCS!
      While there is probably not a single person to whom the name 'WordPress' does not ring a bell nowadays, the full spectrum of possible applications of this most world-renown CMS system still remains one big mystery to so many. 

      Did you know, for instance, that apart from being a tool of invaluable service to millions of bloggers all around the world, WordPress also hosts a large percentage of powerful websites? 
      If you are wondering how this WordPress – WHMCS integration works in practice and, tempted by its ultimate flexibility would like to give our module a shot with the time-limited, astounding 20% discount, stop by our Blog for all essential details!  
    • By ModulesGarden
      1. Needless to say that our products occupy a really special place in our hearts – it is because of this very fact that we devote almost entire attention to brushing them up with ever novel, spectacular updates. But what is even more crucial to us is strategizing on how to make your business duties much easier. Today we are bursting with pride to present you with our spanking new module - WordPress Manager For WHMCS! 

      Establishing a perfect synergy between your WHMCS and this most world-renowned CMS system, our module will provide your clients with a broad spectrum of fundamental functionalities like: 
      Swift and easy management of multiple WordPress instances from the WHMCS surroundings directly. The must-have set of tools for handling WordPress installations and performing all types of actions from adding, editing, and removing to accessing most vital details. Blazing-fast means of activating the desired plugins and even installing them straight from the WordPress base. Double-securing the stored data by creating new WordPress backups and administering the already existing ones. Technical feasibility of carrying out mass actions on plugins and backups. A bunch of other miscellaneous components like logging to a control panel, clearing cache or cloning the selected WordPress installation to a different domain.
      If you wish to comprehend the full dimension of this brilliant tool powered by our futuristic new framework, you are cordially welcome to look around our website!

      Breathe some freshness into your business routine!

      2. Are you familiar with the popular among children (and not only!) play called the Telephone Games? The one where participants pass around a message by means of whispering? Exactly the same thing happens when you release exceptionally intriguing or controversial news that soon reaches the ears of thousands and becomes the main topic of all talks. Although the final version that comes out of these conversations contains a grain of truth of the original, the rest seems to be vastly twisted. Do you want to put an end to all gossips, myths, and speculations revolving around ModulesGarden? Look into the most reliable source of all – our recently added section with Common Questions!

      Have a black and white picture of ModulesGarden!

      3. See what's on the list of the latest releases:
      Hosting Renewals For WHMCS - v3.0.1 Plesk Extended For WHMCS - v2.8.2 IP Manager For WHMCS - v2.4.2 SMS Center For WHMCS - v2.2.3 Zimbra Email For WHMCS - v1.3.7

      Need Custom Software Development For Your Business?
      Get Your Free Quote Now! Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
  • Recently Browsing   0 members

    No registered users viewing this page.


Important Information

By using this site, you agree to our Terms of Use & Guidelines