Browse files

Updating to new language module:key syntax.

  • Loading branch information...
1 parent ebb200e commit 50177ec191014a0d906286232dc8ae047597056c @adamfairholm adamfairholm committed Jan 8, 2012
Showing with 27 additions and 27 deletions.
  1. +2 −2 details.php
  2. +13 −13 language/english/sample_lang.php
  3. +3 −3 views/admin/form.php
  4. +7 −7 views/admin/items.php
  5. +2 −2 views/index.php
View
4 details.php
@@ -18,11 +18,11 @@ public function info()
'menu' => 'content', // You can also place modules in their top level menu. For example try: 'menu' => 'Sample',
'sections' => array(
'items' => array(
- 'name' => 'sample.items', // These are translated from your language file
+ 'name' => 'sample:items', // These are translated from your language file
'uri' => 'admin/sample',
'shortcuts' => array(
'create' => array(
- 'name' => 'sample.create',
+ 'name' => 'sample:create',
'uri' => 'admin/sample/create',
'class' => 'add'
)
View
26 language/english/sample_lang.php
@@ -1,22 +1,22 @@
<?php
//messages
-$lang['sample.success'] = 'It worked';
-$lang['sample.error'] = 'It didn\'t work';
-$lang['sample.no_items'] = 'No Items';
+$lang['sample:success'] = 'It worked';
+$lang['sample:error'] = 'It didn\'t work';
+$lang['sample:no_items'] = 'No Items';
//page titles
-$lang['sample.create'] = 'Create Item';
+$lang['sample:create'] = 'Create Item';
//labels
-$lang['sample.name'] = 'Name';
-$lang['sample.slug'] = 'Slug';
-$lang['sample.manage'] = 'Manage';
-$lang['sample.item_list'] = 'Item List';
-$lang['sample.view'] = 'View';
-$lang['sample.edit'] = 'Edit';
-$lang['sample.delete'] = 'Delete';
+$lang['sample:name'] = 'Name';
+$lang['sample:slug'] = 'Slug';
+$lang['sample:manage'] = 'Manage';
+$lang['sample:item_list'] = 'Item List';
+$lang['sample:view'] = 'View';
+$lang['sample:edit'] = 'Edit';
+$lang['sample:delete'] = 'Delete';
//buttons
-$lang['sample.custom_button'] = 'Custom Button';
-$lang['sample.items'] = 'Items';
+$lang['sample:custom_button'] = 'Custom Button';
+$lang['sample:items'] = 'Items';
?>
View
6 views/admin/form.php
@@ -1,6 +1,6 @@
<section class="title">
<!-- We'll use $this->method to switch between sample.create & sample.edit -->
- <h4><?php echo lang('sample.'.$this->method); ?></h4>
+ <h4><?php echo lang('sample:'.$this->method); ?></h4>
</section>
<section class="item">
@@ -11,12 +11,12 @@
<ul>
<li class="<?php echo alternator('', 'even'); ?>">
- <label for="name"><?php echo lang('sample.name'); ?> <span>*</span></label>
+ <label for="name"><?php echo lang('sample:name'); ?> <span>*</span></label>
<div class="input"><?php echo form_input('name', set_value('name', $name), 'class="width-15"'); ?></div>
</li>
<li class="<?php echo alternator('', 'even'); ?>">
- <label for="slug"><?php echo lang('sample.slug'); ?> <span>*</span></label>
+ <label for="slug"><?php echo lang('sample:slug'); ?> <span>*</span></label>
<div class="input"><?php echo form_input('slug', set_value('slug', $slug), 'class="width-15"'); ?></div>
</li>
</ul>
View
14 views/admin/items.php
@@ -1,5 +1,5 @@
<section class="title">
- <h4><?php echo lang('sample.item_list'); ?></h4>
+ <h4><?php echo lang('sample:item_list'); ?></h4>
</section>
<section class="item">
@@ -11,8 +11,8 @@
<thead>
<tr>
<th><?php echo form_checkbox(array('name' => 'action_to_all', 'class' => 'check-all'));?></th>
- <th><?php echo lang('sample.name'); ?></th>
- <th><?php echo lang('sample.slug'); ?></th>
+ <th><?php echo lang('sample:name'); ?></th>
+ <th><?php echo lang('sample:slug'); ?></th>
<th></th>
</tr>
</thead>
@@ -32,9 +32,9 @@
<?php echo rtrim(site_url(), '/').'/sample'; ?></a></td>
<td class="actions">
<?php echo
- anchor('sample', lang('sample.view'), 'class="button" target="_blank"').' '.
- anchor('admin/sample/edit/'.$item->id, lang('sample.edit'), 'class="button"').' '.
- anchor('admin/sample/delete/'.$item->id, lang('sample.delete'), array('class'=>'button')); ?>
+ anchor('sample', lang('sample:view'), 'class="button" target="_blank"').' '.
+ anchor('admin/sample/edit/'.$item->id, lang('sample:edit'), 'class="button"').' '.
+ anchor('admin/sample/delete/'.$item->id, lang('sample:delete'), array('class'=>'button')); ?>
</td>
</tr>
<?php endforeach; ?>
@@ -46,7 +46,7 @@
</div>
<?php else: ?>
- <div class="no_data"><?php echo lang('sample.no_items'); ?></div>
+ <div class="no_data"><?php echo lang('sample:no_items'); ?></div>
<?php endif;?>
<?php echo form_close(); ?>
View
4 views/index.php
@@ -6,8 +6,8 @@
<div class="sample-data">
<table cellpadding="0" cellspacing="0">
<tr>
- <th>{{ helper:lang line="sample.name" }}</th>
- <th>{{ helper:lang line="sample.slug" }}</th>
+ <th>{{ helper:lang line="sample:name" }}</th>
+ <th>{{ helper:lang line="sample:slug" }}</th>
</tr>
<!-- Here we loop through the $items array -->
{{ items }}

0 comments on commit 50177ec

Please sign in to comment.