Jump to content

Modify Language Flags


TravelinMoe

Recommended Posts

Hi there,

I am trying to change the language flags found at the top of the page. I have modified the .PNG image in the \language\flags folder, cleared the browser cache and clear the CubeCart Cache, but the old flags still appear. The language is good, but I want to show a Canadian and Mexican  flag instead of UK and Italy. Everything else is awesome and just tweaking now!

Any ideas? 

Thanks,

Maurice

Link to comment
Share on other sites

The images in the /language/flags folder are used by other processes.

For the Foundation skin, there is a 'sprite' in the /skins/foundation/images/ folder.

The skin code uses CSS rules to slide the sprite up and down so that the relevant part of the sprite appears in the area set to display, which is just one flag wide and tall.

The process is this:

There are a fine set of properly-sized flags in the latest downloadable package of the CC5 family. (I do not know why they were removed from the CC6 family, other than, I suppose, as you download and install other language packs, the flag will come with it.)

Load the sprite into an image editor. Add the desired flags to the bottom of the sprite.

In the file cubecart.css, near line 231, examine how each CSS rule offsets the span selector according to the flag that is wanting to show - each offset by X times 11 pixels.

Maintain the scheme for the other two flags added.

In the file templates/box.basket.php, the code need not be changed, but only to point out that enabled languages will be in the $LANGUAGES array.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...