Package translate :: Package tools :: Module pypo2phppo :: Class pypo2phppo

[hide private]
[frames] | no frames]

# Class pypo2phppo

source code

Instance Methods | [hide private]

convertstore(self, inputstore) Converts a given .po file (Python Format) to a PHP format .po file, the difference being how variable substitutions work. | source code

convertunit(self, unit) | source code

convertstring(self, string) | source code

convertstrings(self, input) | source code

Method Details | [hide private]

### convertstore(self, inputstore)

source code

    Converts a given .po file (Python Format) to a PHP format .po file, the difference being
    how variable substitutions work.  PHP uses a %1$s format, and Python uses
    a {0} format (zero indexed).  This method will convert, e.g.:
        I have {1} apples and {0} oranges
            to
        I have %2$s apples and %1$s oranges
    This method ignores strings with %s as both languages will recognize that.