Jump to content

Custom Fields translatable ?


wp4all

Recommended Posts

Hi,

some question about the custom Fields is there a chance to translate them ?

I added for the personal salutation a custom field, but as usual it is only one Language possible.

image.png.bd20adf784d2682b4a72d0be382e904a.png

therefor I created a custom Fiel to the Register-Page like 

image.png.9bba641fa23ec782b2c62c1747040b34.png

but as you can see it is English and instead of Mister we have Herr.

Here is the hook I use:

function custom_welcome_back($vars) {
  global $smarty;
  $get_templatefile = $smarty->getVariable('templatefile')->value;
  if($get_templatefile == 'clientareahome'){
    $get_orig_titel = $smarty->getVariable('LANG')->value;
    $get_details = $smarty->getVariable('clientsdetails')->value;
    return array(
      'displayTitle' => $get_orig_titel['welcomeback'].', '. $get_details['customfields2'].' '.$get_details['lastname'],
      
    );
  }
}
  add_hook("ClientAreaPage",100,"custom_welcome_back");

Any Idea how to get this translated ?

Thanks Christian

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.

×
×
  • 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