Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated README file. Started the skeleton of the backend.
- Loading branch information
root
committed
Feb 9, 2010
1 parent
1e3740a
commit 2888190
Showing
6 changed files
with
157 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# PHP I18n # | ||
|
||
by Tom Rochette | ||
<roctom@gmail.com> | ||
<http://www.tomrochette.com> | ||
|
||
## Introduction ## | ||
A brief summarization of what I18n is: | ||
|
||
> In computing, internationalization and localization (also spelled internationalisation and localisation, see spelling differences) | ||
> are means of adapting computer software to different languages and regional differences. Internationalization is the process of | ||
> designing a software application so that it can be adapted to various languages and regions without engineering changes. | ||
> Localization is the process of adapting internationalized software for a specific region or language by adding locale-specific | ||
> components and translating text. | ||
> Source : [Wikipedia](http://en.wikipedia.org/wiki/Internationalization_and_localization) | ||
This implementation is inspired and thus borrows heavily from Ruby on Rails' I18n. | ||
Ruby/Rails programming conventions have been maintained as much as possible. Deviation is due to language differences. | ||
|
||
## Minimum Requirements ## | ||
|
||
PHP 5.3+ | ||
Symfony PEAR Yaml Parser | ||
|
||
## Installation ## | ||
|
||
Setup is very easy and straight-forward. Essentially, you have to point to the locales folder, and that's pretty much it. | ||
|
||
### Installing required PEAR package ### | ||
pear channel-discover pear.symfony-project.com | ||
pear install symfony/YAML | ||
|
||
## Features ## | ||
|
||
- Internationalization similar to I18n found in Ruby on Rails I18n. | ||
|
||
## Usage ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?php | ||
|
||
namespace I18n\Backend; | ||
|
||
class Base | ||
{ | ||
private $initialized = false; | ||
|
||
public function load_translations(array $filenames) | ||
{ | ||
|
||
} | ||
|
||
public function store_translations($locale, $data, $options = array()) | ||
{ | ||
|
||
} | ||
|
||
public function translate($locale, $key, $options = array()) | ||
{ | ||
|
||
} | ||
|
||
public function localize($locale, $object, $format = 'DEFAULT', $options = array()) | ||
{ | ||
|
||
} | ||
|
||
public function is_initilized() | ||
{ | ||
return $this->initialized; | ||
} | ||
|
||
public function available_locales() | ||
{ | ||
|
||
} | ||
|
||
public function reload() | ||
{ | ||
|
||
} | ||
|
||
public function lookup($locale, $key, $scope = array(), $options = array()) | ||
{ | ||
|
||
} | ||
|
||
public function default($locale, $object, $subject, $options = array()) | ||
{ | ||
|
||
} | ||
|
||
public function resolve($locale, $object, $subject, $options = null) | ||
{ | ||
|
||
} | ||
|
||
public function pluralize($locale, $entry, $count) | ||
{ | ||
|
||
} | ||
|
||
public function interpolate($locale, $string, $values = array()) | ||
{ | ||
|
||
} | ||
|
||
public function preserve_encoding($string) | ||
{ | ||
|
||
} | ||
|
||
public function interpolate_lamba($object, $string, $key) | ||
{ | ||
|
||
} | ||
|
||
public function load_file($filename) | ||
{ | ||
|
||
} | ||
|
||
public function load_php($filename) | ||
{ | ||
|
||
} | ||
|
||
public function load_yml($filename) | ||
{ | ||
|
||
} | ||
|
||
public function merge_translations($locale, $data, $options = array()) | ||
{ | ||
|
||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
en: | ||
foo: | ||
bar: baz | ||
|