Jump to content


Error with RTL view style When loading lang files

RTL Language View Style

  • Please log in to reply
4 replies to this topic

#1 Mu_Nizar

Mu_Nizar

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 19 June 2013 - 02:08 PM

Hi all ,

I am using grocery crud with CI and every thing is well.
I have more than one controller and they all use the same crud view with different $output

my crud view looks like:

<?php foreach ($css_files as $file): ?>
    <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach ($js_files as $file): ?>
    <script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
<div class="headings">
    <h1><?php echo ucfirst(str_replace("_", " ", $current)); ?></h1>
</div>
<br/>
<div>
    <?php echo $output; ?>
</div>

and my controllers look like:
 

function __construct() {
        parent::__construct();
        $this->load->database();
        $this->load->helper('url');
        $this->load->library('grocery_CRUD');
        $this->load->library('validator');
        $this->load->library('form_validation');
        $this->lang->load('folders', 'arabic');/*lol*/
        $this->lang->load('common', 'arabic');/*lol*/
    }

public function index() {
$crud = new grocery_CRUD();
if (isset($this->session->userdata["gui_lang"]))
         $crud->set_language($this->session->userdata("gui_lang"));
      else
         $crud->set_language("arabic");
      $crud->set_table('message');
      $crud->set_subject('Draft');
      $crud->columns(.....);
      $crud->where(....);
      $crud->display_as('...', $this->lang->line('...'))
      $output = $crud->render();
      $this->load->view('header');
      $this->load->view('sidebar');
      $this->load->view('crud', $output);
      $this->load->view('footer');
}        

       
I want to convert layout to RTL, I download file from http://www.grocerycr...-rtl-languages/
and use it, the style damaged after I load language file !!!
 

Important Note: when I omit lines /*lol*/ in the construct (omit loading language files) the damage resloved! but no language then.

pleace any help...
thanks in advance

Attached Thumbnails

  • fine.PNG
  • damaged.PNG


#2 Mu_Nizar

Mu_Nizar

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 20 June 2013 - 08:49 AM

thanks!

I found the answer :) it is strange :huh:

for each language file I do:

 - select all $lang lines

 - cut them

 - ctrl + a

 - delete

 - open <?php

 - ctrl + v

 - close ?>

 

may there were hidden charterers in the language files (Arabic files) (although they are working in English mode)

----



#3 Mu_Nizar

Mu_Nizar

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 20 June 2013 - 09:03 AM

I would ask why I didn't get any answer or any interaction :ph34r:



#4 jad

jad

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 20 June 2013 - 01:20 PM

hi all and Mu_Nizar :)

 

thanks you ,I face the same problem in my previous project, it confuse me :blink:

 

also and one more time thank you and crud founder


B) Do not be afraid and intimidated B)

 


#5 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 20 June 2013 - 04:56 PM

Hello Mu_Nizar. I haven't used the RTL version of the language files so I can't comment on that!

Strange though!

 

Maybe the original file was on different encoding?


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr






Also tagged with one or more of these keywords: RTL, Language, View, Style

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users