<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

class prepare_translate_data
{

    public function prepare($id_user, $form_name)
    {
        $ci = & get_instance();
        $ci->load->library('db_lang_lib');
        $id_lan = $ci->db_lang_lib->get_current_lang_id();

        $data = [
            'id_acl_user' => $id_user,
            'name'        => (string) $ci->{$form_name}->get_value('name'),
            'surname'     => (string) $ci->{$form_name}->get_value('surname'),
            'id_lan'      => $id_lan
        ];

        return $data;
    }

}
