| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 3599|Reply: 1
Collapse the left

How to get the current chosen language?

[Copy link]

 China

Post time: 2012-07-23 05:50
| Show all posts |Read mode

Hi,
I am making a plugin that  fits the X2.5ML. So, how do I get the current chosen language in the php program?

 Russia

Post time: 2012-07-23 07:25
| Show all posts
There are the next global variables:

For PHP files (defined in the core):
1) DISCUZ_LANG - global constant containing the current language code (en, de, fr, etc)
2) $_G[langdir] - current language direction (ltr or rtl)
3) RTLSUFFIX - global constant containing the current language html suffix (dir="rtl" or empty string)

Javascript global variables (defined in the header_common.htm):
1) LANG = 'ru' (en. fr, de. etc..)
2) LANGDIR = 'ltr' (or rtl)
3) RTLSUFFIX = ' dir="rtl"' (or '' for ltr)

You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-22 16:01 GMT+3 , Processed in 0.030564 sec., 9 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list