php shopping cart
free shopping cart   shopping cart software

Free Shopping Cart PHP Software


Back to Functions List
This Function Has Been Available Since:
(AFCommerce v 2.1,     Functions v 1.1)

Checks to see what language the current user is using.


integer = afc_get_current_langid (id)

This function will figure out which language the current user is viewing your website in. Most people are only using one language so this function is rarely used, however this function is still used inside of carttop.php and inside of other functions when figuring out the current "langid". English has a langid of 1, Spanish 2, and in the future more languages will be added and assigned a value to them. This function will check the current user's basket session to see if they have changed the default language your website uses. So if you were using 2 languages, you are able to set which language is used by default. Whenever two or more languages are turned on, a link will appear under the categories on your website that will allow the user to switch from one language to another. If the current user does not have an active session, the default language will be returned, and if their is a current session, the language the user is using will be returned. Whenever you need to include the language file (where the default text used on the cart's pages is stored), you should use this function to find the proper language id first.


id (integer) - Anytime you see this variable being passed to a function, all you need to do is simply use the variable $id, which is automatically set for you when dbinfo.php is called.

Return Values

Returns the current langid the website visitor is using.

Open Source: Yes

Paul's Examples

There are currently no examples for this function.

Back to Functions List


There are currently no posts for this topic.

AFCommerce Documentation

High End Website DevelopmentCompletely Free
Dating Service
Copyright 2004 - 2006
AFCommerce Website
And Cart Builder