M
M
max_rip2011-08-30 02:06:34
Machine translation from one language to another
max_rip, 2011-08-30 02:06:34

Editor for php language files of type array?

Let's say there is a file

$lang = array (
'title1' => "титл 1",
'title2' => "титл 2"
)

It needs to be translated into another language.
Googled, found different programs, BUT they do not know how to work with this format.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexey Ashurok, 2011-08-30
@max_rip

Developing the theme of converting:

  1. Writing a php.array -> .po converter
  2. We use any favorite editor for .po language files
  3. Reverse transform .po -> php.array
  4. ...
  5. profit!

R
Riateche, 2011-08-30
@Riateche

You can write a simple script in the same php that converts such a file to any convenient format and vice versa. For example, convert to CSV and translate with Excel.

D
Dialog, 2011-08-30
@Dialog

csv, xml, json, ... - the format for storing source texts can be different ,
and then I agree with Riateche - write a simple script
if you are too lazy, then you can make it into a table in MySql and then export it to a php array and manually modify it ... but this is completely already way perverted
for such tasks there is no specialized software

D
dals, 2011-08-30
@dals

I wrote my own script, it was in PHP + JS + HTML
A page with a form of the label + input type is formed from the array. The label is the key, the input is the field
where the translation is entered (pre-filled if the translation already exists)
with translation: key input + translation input
Then the submitted form is transformed into an array, which is written to a file.
Crutch-bicycle, but there were pluses:
- written quickly
- was built into the admin panel
- did not require any special tools
- available at any time the project was available on the web
- edits could be applied quickly

F
FLAKON, 2011-09-12
@FLAKON

$config = array();
# Array of categories
$config['blog']['categories'] = array('cat1', 'cat2', 'cat3' => array('cat4', 'cat5'));
tell me how to add new categories, this is a piece of the category plugin config for livestreet 0.4.2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question