hkhost Posted April 6, 2021 Share Posted April 6, 2021 Sorry, I can't find information about this issue. When using the Twenty-One theme, the Chinese flag for Traditional Chinese language is wrong. Can someone explain how to change it? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 6, 2021 Share Posted April 6, 2021 (edited) 8 hours ago, hkhost said: When using the Twenty-One theme, the Chinese flag for Traditional Chinese language is wrong. oh it's showing the Taiwan flag instead - that's embarrassing for WHMCS and controversial! 🙄 you know it's worse than just China being wrong... Arabic -> Argentina Flag (really? - just because Arabic starts with AR, the country code used is AR ??) Catalan -> Andorra Flag (it's a different country (yeah I know Catalonia isn't an official country) - though at least physically closer than Argentina is to being an Arabic-speaking country)... appears not to be a Catalan flag option in the sprite file. English -> Hard coded to use USA Flag in the template.... you can tweak it to show Australia/New Zealand flags etc, but the template would effectively prevent you from using the UK flag... viable ways around that would be to edit the template and remove that condition, or use another hook to change the css class to use the correct flag. I can't help thinking there is a WHMCS programmer stuck in a basement somewhere in Houston that has never left the States - nobody at WHMCS internally or externally noticed this during testing ??? 🙄 8 hours ago, hkhost said: Can someone explain how to change it? quick fix would be to use a hook... <?php # Change Country Flags Footer Hook # Written by brian! function change_country_flags_hook($vars) { $activelocale = $vars['activeLocale']; if ($activelocale["language"] == "arabic") { $activelocale["countryCode"] = "EG"; } elseif ($activelocale["language"] == "chinese") { $activelocale["countryCode"] = "CN"; } elseif ($activelocale["language"] == "english") { //$activelocale["countryCode"] = "AU"; } return array("activeLocale" => $activelocale); } add_hook("ClientAreaPage", 1, "change_country_flags"); you might want to report it as a bug so that this gets updated for the next release. Edited April 6, 2021 by brian! 0 Quote Link to comment Share on other sites More sharing options...
hkhost Posted April 6, 2021 Author Share Posted April 6, 2021 1 hour ago, brian! said: oh it's showing the Taiwan flag instead - that's embarrassing for WHMCS and controversial! Yes! I don't know how many clients we lost because of this very sensitive issue. 1 hour ago, brian! said: nobody at WHMCS internally or externally noticed this during testing ??? Exactly! I wonder what testing are they doing during the Beta Releases... Anyway, thanks for the help, I will go ahead and report this bug. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 7, 2021 Share Posted April 7, 2021 18 hours ago, hkhost said: Yes! I don't know how many clients we lost because of this very sensitive issue. I can well imagine how offensive some users will have found it to have that flag appearing representing China. English shouldn't even be hardcoded in the template to default to the US flag - a value for English should be taken from the Default Country value in the localisation settings if it's UK, US, Canada, Australia, New Zealand etc - if it's not one of them, then I wouldn't object to it being automatically set to USA. 0 Quote Link to comment Share on other sites More sharing options...
hkhost Posted April 7, 2021 Author Share Posted April 7, 2021 Case CORE-16485 Except for the English language, all other flags can be changed using the language overrides, example: $_LANG['locale'] = "zh_HK"; They should offer a free year license for each bug reported... 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 7, 2021 Share Posted April 7, 2021 9 minutes ago, hkhost said: Except for the English language, all other flags can be changed using the language overrides, example: have you tried that? I don't think it works - in fact, WHMCS has long seemingly ignored that value within the lang files for locales. 11 minutes ago, hkhost said: They should offer a free year license for each bug reported... with a bonus year when that bug gets fixed. 0 Quote Link to comment Share on other sites More sharing options...
hkhost Posted April 7, 2021 Author Share Posted April 7, 2021 31 minutes ago, brian! said: have you tried that? I don't think it works - in fact, WHMCS has long seemingly ignored that value within the lang files for locales. Yes, it is working, but to see the changes you need to clear the cache for language locales running the following query in the DB delete from tbltransientdata where name = 'WHMCS\\Language\\ClientLanguageLocales'; 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 7, 2021 Share Posted April 7, 2021 7 minutes ago, hkhost said: Yes, it is working, but to see the changes you need to clear the cache for language locales running the following query in the DB aah - I cleared the template cache, but never occurred to me about the db. 0 Quote Link to comment Share on other sites More sharing options...
UnwilfulExpenditure Posted August 18, 2021 Share Posted August 18, 2021 On 7/04/2021 at 12:03 PM, brian! said: I can well imagine how offensive some users will have found it to have that flag appearing representing China. English shouldn't even be hardcoded in the template to default to the US flag - a value for English should be taken from the Default Country value in the localisation settings if it's UK, US, Canada, Australia, New Zealand etc - if it's not one of them, then I wouldn't object to it being automatically set to USA. I just had a search here to help a friend! I assume people worked it out in the end! the value is "gb" 0 Quote Link to comment Share on other sites More sharing options...
rade023 Posted March 21, 2023 Share Posted March 21, 2023 Hello guys, One question about flags in modal box. How to list all flags in that modal <a href="#" class="item{if $language == $locale.language} active{/if}" data-value="{$locale.language}"> {$locale.localisedName} </a> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.