⚠ In case you've missed it we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠

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



  • 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>
    <?php echo $output; ?>

and my controllers look like:

function __construct() {
        $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->display_as('...', $this->lang->line('...'))
      $output = $crud->render();
      $this->load->view('crud', $output);

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



  • Members
  • Pip
  • 5 posts

Posted 20 June 2013 - 08:49 AM


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



  • 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



  • 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

#5 davidoster


    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts

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?

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