Add new flag

Hello,



Anyone knows how can i add a new flag for a new language that not exist in the cs-cart DB?

Regards

There is a post on here somewhere I seen it a couple of months back.



John

Hello IMP!



Try to add a new image in skins/[SHOP_SKIN_NAME]/customer/images/flags/[LOWERCASE_LANG_CODE].png

Where

LOWERCASE_LANG_CODE is en, nl, ru etc.

SHOP_SKIN_NAME is basic, cars, your store skin.



For example, skins/basic/customer/images/flags/ru.png



Best regards, Alt-team

Hi , Alt-team

I tried your steps but i didn't find directory [color=#282828][font=arial, verdana, tahoma, sans-serif]skins/[SHOP_SKIN_NAME]/customer/images/[/font][/color][color=red][font=arial, verdana, tahoma, sans-serif]flag[/font][/color][color=#282828][font=arial, verdana, tahoma, sans-serif]s[/font][/color]

I just find one PNG file with name flags

PLZ help



thanks

Hi,



The way Cs-Cart handles flags has changed in recent versions (3.0.x). The comment form Alt-Team is correct for versions 2.2.x or lower (Alt-Team deserves me a great respect, as I've found many of his comments among the most useful in the forum).



For version 3.0.x CS-Cart only handles 1 png file and, via CSS, it locates the starting position of the flag inside this unique png image.



So, in order to add a flag, you must:[list]

[]Edit the file “flags.png” in order to add the new flag. I recommend you to add it to the end of the image.

[
]Then you must replace your new file for the old one, in the “admin” and “customer” directory of your active skin

[]After that, you shoul edit the css file, for each section (“admin” and “customer”). Those files are in

[list]

[
]For the “admin” section: skins/your_active_skin/admin/styles.css

[]For the “customer” section: skins/your_active_skin/customer/base.css

[/list][
]What you'll need to do, for each case is the following:

[list]

[]Open the css file and search for the label .flag.flag-zw{background-position: 0 -4347px;}

[
]After that line, add the following: .flag.flag-your_two_letter_prefix{background-position: 0 -4364px;}

[/list][]And that's all!

[
]Please, keep in mind that “your_two_letter_prefix” must be the same as the one you're using to identify the language in cs-cart. In my case, as I wanted to add the catalan flag for use with the catalan language, I first created such language file in Cs-Cart admin, I labelled it “ct”, and then, I added the css label: .flag.flag-ct{background-position: 0 -4364px;}

[/list]

I attach the flags.png that I modified in order to include the catalan flag, so you will see how I did it.



Hope that helps! And don't hesitate to amend me if there's something not accurate in my post!

flags.png