View Full Version : Already done Flags

11-03-10, 04:33
Would it be possible to add something like a "User1 Flag," "User2 Flag," etc. in the vBET settings that would allow entry of a flag bitmap file name and associated existing vBET's language? The reason for the request is that, for example, English is more closely associated to the U.S. flag for users in the U.S. while the existing U.K. flag is more recognizable to users beyond the U.S. So, both would ideally be selectable even though they refer to the same translated language. I am getting by through "morphing" together both the U.S. and U.K. flags into one single flag but greater flexibility in this area would be welcomed.

12-03-10, 03:06
I do not fully understand what you are asking for. How you want to determine which flag should be shown to who?

12-03-10, 05:42
Sorry, I am not being clear. Let me try this way... I would like the ability to be able to assign an additional flag to the same language already represented by a pre-assigned flag. An example of why this is a desirable configurable option is that Americans relate English to the American flag while most of the rest of the world are not confused when they see a British flag representing English. But I have received multiple inquiries as "where is the English translation flag?" where I had to explain it was the British flag. But that's just one example. I had a beta tester ask me why I had a Moldovan flag for Yiddish and though I satisfied him with the rationale, I would still like the option to change or add a flag that points to a translation language. Hope this is more clear. If not, just let me know ;-)

13-03-10, 01:12
I understand the need and I agree that it can be useful :) To just change flag it is enough to override existing image. Tricky thing would be to have 2 flags for same language. The tricky part is how to determine which flag show to who.

Request accepted - low priority but we will work on this :)

My actual idea how could it be done is to determine by client IP from which country he is. Having country code we can check does exist flag for language and this country. It means i.e. for English we have en.gif So uf for example someone is from USA then vBET could check for each flag does exist special flag for people from USA - like en_USA.gif - if yes then special one is shown. If not then standard one. For performance reason we can give option for which flags make checking (+ to do this for all or just logged users).

So in this solution it would be enough to turn on such checking, and add new images to flags folder (according to name convention). And you can have dozen flags for English (England, USA, Australia, Canada..). The issue is how costly will be to determine user country, and make file checking - I guess that we have to just check it :)

Does such solution would be acceptable? :)

13-03-10, 02:52
Very acceptable. Low priority is fine. Thank you!

22-03-10, 02:45

I wont to show code:
instead of flags

but, i cant find plugin/files where i need to remove <img src=**********> and add $code

22-03-10, 08:13
For flags in row please edit template: vbenterprisetranslator_flags
Also for those edit plugin for hook (for archive flags): archive_complete

For flags in dropdown menu please edit plugin for hook: parse_templates

22-03-10, 13:59
Great !
Its work ;)

Thank you!
(i will buy removing footer link for thanksgiving :))

24-03-10, 01:54
default, flags link in this way:

because of SEO, i try to add:

TEMPLATE: vbenterprisetranslator_flags have this line:
<vb:each from="flags" value="flag">
<a rel="novbseo" href="{vb:var flag.url}"

if i add:
<a rel="novbseo" href="mysite.com/{vb:var flag.url}"
because od / , VB have problem with EACH/IF and my links have:

how i can add mysite.com/ in {vb:var flag.url} ?
i try to find this variable without success

24-03-10, 07:09
I do not think that it will increase your SEO in any way. Robots know how to resolve relative URLs. What it will give you for sure is more data to send with each response (because of longer URLs). So please consider again is it worth to change.

About the issue itself you have to edit file /includes/vbenterprisetranslator_functions_url_tracking.php:
1. find:

if (0 === strpos($address, 'vbet_flag-')) {
2. REPLACE by:

if (false !== strpos($address, 'vbet_flag-')) {

This was not tested so please confirm does it solved your issue. If yes we will include it in next release (so you will have no troubles with upgrades) :)

24-03-10, 14:10
ADMINCP > VBET > vBET Main > Forum directory

I add full path mysite.com, and now links are full path without additional programing

thank you for other solution ! ;)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
vBET PRODUCER_PRODUCT_VERSION gives automatic translations