O
O
oe24y2018-12-03 10:42:31
Internationalization and localization
oe24y, 2018-12-03 10:42:31

How to translate array values ​​in PHP code into another language (see inside)?

There is this code:

$_lang['quip.thread_truncate_selected_confirm'] = 'Are you sure you want to remove all comments in these threads?';
$_lang['quip.threads'] = 'Threads';
$_lang['quip.unapproved'] = 'Unapproved';
$_lang['quip.unapproved_comments'] = 'Unapproved Comments';

It is necessary to translate only the values ​​into another language, without affecting the keys.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Sitnikov, 2018-12-03
@p_monsta

foreach ($_lang as $i => $value) {
$_lang[$i] = *new value*;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question