2cb621e7 |
1 | <?php |
2 | |
3 | /** |
4 | * set_language_align.php |
5 | * |
6 | * Copyright (c) 1999-2003 The SquirrelMail Project Team |
7 | * Licensed under the GNU GPL. For full terms see the file COPYING. |
8 | * |
9 | * which return direction and alignments for the table (stuff like the headers |
10 | * input tags etc. need to be aligned differently in arabic and hebrew). |
11 | * |
12 | * $Id$ |
13 | */ |
14 | |
15 | function set_language_align(){ |
16 | GLOBAL $languages, $squirrelmail_language; |
17 | $text_align = array(); |
18 | if ( isset( $languages[$squirrelmail_language]['DIR']) ) { |
19 | $text_align['dir'] = $languages[$squirrelmail_language]['DIR']; |
20 | } else { |
21 | $text_align['dir'] = 'ltr'; |
22 | } |
23 | $text_align['left'] = $text_align['dir'] == 'ltr' ? 'left' : 'right'; |
24 | $text_align['right'] = $text_align['dir'] == 'ltr' ? 'right' : 'left'; |
25 | return($text_align); |
26 | } |
27 | ?> |