web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Hackathon Challenges / CHALLENGE #4 - Translate It...

CHALLENGE #4 - Translate Item Descriptions (LEVEL 2)

Freddy Kristiansen Profile Picture Freddy Kristiansen

Scenario

For companies that provide item descriptions in more than one language, storing these descriptions on the item card (via extended text, for example) provides a ready-to-use reference.  As new items are entered, a service would translate the item description into one or more languages and store the translation for reference or use on orders or e-commerce engines.

To complete this challenge, you will need

To complete this challenge, you will need:

Expected result

Steps

  • Create an empty app
  • Create a table extension for the item table and add fields
  • Create a page extension for the item card and add fields
  • Add a Codeunit with a function that translates a text from one language to another.
  • Add a button to the Item card, calling the translate method for all new description fields.

Hints

  • In VS Code, use Ctrl+Shift+P and type AL GO and remove the customerlist page extension
  • Use the ttableext, and the tfieldtext snippet
  • Use the tpageext and the tpagefield snippet
  • Use HttpClient to communicate with the Web Service and use Json types (JsonObject, JsonToken, JsonArray and JsonValue) to build content and extract values from the Web Service result. See https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-translate 
  • Use taction snippet and add code to call the translate method

Cheat Sheets

  • Create an empty app
  • Create a table extension
  • Create a page extension
  • Code for translating text
  • Action for translating the description
  Happy coding Freddy Kristiansen Technical Evangelist Passwords: Mahi1776, Koha3443, Mowu5430, Fehy2599, Lesu5260

This was originally posted here.

Comments

*This post is locked for comments