Jump to content

WHMCS Internal Class


Nagarajan

Recommended Posts

Hello,

The default language is English. I also activated Russian language and the product name is translated into Russian.

In the line below, I get the name of the product in English:

$ProductName = Product::getProductName(100, '', 'ru');

Please guide me?

Link to comment
Share on other sites

I tried also to use this code:

$product = Capsule::table('tblproducts')
    ->join('tblpricing', 'tblproducts.id', '=', 'tblpricing.relid')
    ->where('tblpricing.type', '=', 'product')
    ->where('tblproducts.id', $PID)
    ->where('tblpricing.currency', 1)
    ->select('tblproducts.*', 'tblpricing.*')
    ->first();

$productname_translation = Capsule::table('tbldynamic_translations')
    ->where('related_id',$PID)
    ->where('language','russian')
    ->select('tbldynamic_translations.translation')
    ->get();

$ProductNameIRussian = $productname_translation[0]->translation;

Buy it is not correct. It is not product name in Russian.

 

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