Jump to content

Control Rtl/lft Lft/rtl By Language File


Blesta Addons

Recommended Posts

Not sure how that would work but maybe a special template for right to left?

it will work the same as the other has .

is too sample , add a line in the language file like

direction = 'rtl'

if the direction is set use it , if not use the default direction .

maybe we can controle also the charset , this is just a idea .

blesta have already a file to get the name language , we can use it

English, US

direction, rtl

en general a example :

setlocale(LC_ALL, 'ar');
setLocale(LC_TIME, "ar_SA.UTF-8");
define("language", "Arabic");
define("CORE_LC", "AR");
define("CORE_LC2", "ar");
define("CHARSET", "utf-8");
define("TEXTDIRECTION","rtl");
define("COMPATIBILITE", "3.2.1");
define("RELEASE", "2014-05-15");
define("AUTHOR", "Community");

i use like that in my multi-language project . i can controle the output of the date/time with the supported language for any language .

Link to comment
Share on other sites

The direction is already set by the language file (CORE-850). If you downloaded the language from the translator, then it has been set appropriately already.

 

If you're creating the language definitions yourself, then you need to set it in /languages/<lang_code>/app_controller.php:

// Language direction (only ltr or rtl)
$lang['AppController.lang.dir'] = "ltr";

A right-to-left language may not look good in the interface due to styling, so that is something you'll need to consider yourself, as we have not gotten to it yet. CORE-851

Link to comment
Share on other sites

  • 1 month later...

Sorry to up this thread again . as the first post we heat changing the core files (we can do it and get the result we need) .

what about CORE-851 ? any update news .

i have tested the the solution mentioned by adding a new "rtl.css" if the language is rtl in the structure , is working fine .

just include it the default style at least client side , i will fill up the rtl.css and send you the style need to be in that file .

OUT of this thread , to complete task for the template we hope this one laso be included in v 3.3.0

http://www.blesta.com/forums/index.php?/topic/3012-language-file-for-template/

Link to comment
Share on other sites

Hello Tyson

i will complete this task after i finish the cpanel manage2 module (it will be free also for the comunnity) . then i will sen dyou the css file for rtl language . in versus i need this to be added to your task :)

http://www.blesta.com/forums/index.php?/topic/3012-language-file-for-template/

Link to comment
Share on other sites

i have completed the task for CORE-851 .

 

i will contact tyson in private to send him the files toinclude them in v3.2.2 /3.3.0

 

 

Now we have a big probleme

 

the navlinks get thier name from database , if we change the language , the nav link remain the same .

 

is better to move the link name from database to language files .

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.

Loading...
×
×
  • Create New...