R
R
Rostislav Olshevsky2014-12-08 16:37:14
Drupal
Rostislav Olshevsky, 2014-12-08 16:37:14

Drupal 7 - Translation files?

Hello.
How to make a website multilingual. You need to be able to insert variables into the Page editor that will accept the text of the selected language.
3ed4159cf0c6.png
I would like it to be something like:
1) I create 2 files, for example: english.lng and russia.lng
english.lng:

title: English title
content: super english content

english.lng:
title: Русский заголовок
content: русский контент

Well, in the editor itself, I would use the title and content variables .
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rostislav Olshevsky, 2014-12-08
@DEA7H

Understood a little.
Added user variables:

function t_variables_variable_info($options)
{
    $variable['euro_rate'] = array(
        'title' => 'Курс евро',
        'description' => 'Стоимость одного евро в гривнах, например, 11.50',
        'type' => 'number',
        'access' => 'administer menus',
        'translatable' => true,
        'default' => 13.95,
    );
    $variable['usd_rate'] = array(
        'title' => 'Курс доллара',
        'description' => 'Стоимость одного доллара в гривнах, например, 8.50',
        'type' => 'number',
        'access' => 'administer menus',
        'default' => 9.98,
    );
    return $variable;
}

And I use them in the editor through the token_filter module :
Now, how can I make it so that variables can be translated into different languages?
Something 'translatable' => true doesn't work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question