Jump to content

How can i translate this?


conecta6

Recommended Posts

Hi, i have translated so many string with override, but i dont know exactly how can y translate in this code THE OPTIONS

 

$additionaldomainfields[".es"][] = array("Name" => "ID Form Type", "LangVar" => "estldidformtype", "Type" => "dropdown", "Options" => "Other Identification,Tax Identification Number,Tax Identification Code,Foreigner Identification Number", "Default" => "Other Identification",);

 

and in this THE ARRAY AND DEFAULT

 

$additionaldomainfields[".es"][] = array(
   "Name" => "Legal Form",
   "LangVar" => "estldlegalform",
   "Type" => "dropdown",
   "Options" => implode(
       ',',
       array(
           '1|Individuo',
           '39|Grupo de interés económico',
           '47|Asociación',
           '59|Asociación Deportiva',
       )
   ),
   "Default" => "1|Individuo",
);

 

¿Any idea how can i call to this elements?

thanks

Link to comment
Share on other sites

using language override, add the translation variables you will use:

 

$_LANG['Individuo'] = "Individuo";
$_LANG['Grupo de interés económico'] = "Grupo de interés económico";

 

and modify the options array, so it will call the translation method like that:

 

$additionaldomainfields[".es"][] = array(
   "Name" => "Legal Form",
   "LangVar" => "estldlegalform",
   "Type" => "dropdown",
   "Options" => implode(
       ',',
       array(
           '1|'.lang::trans('Individuo'),
           '39|'.lang::trans('Grupo de interés económico'),
           '47|Asociación',
           '59|Asociación Deportiva',
       )
   ),
   "Default" => '1|'.lang::trans('Individuo'),
);

 

simple and easy :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated