Git Product home page Git Product logo

lexico's Introduction

Lexico - Data Translations

What is Lexico?

Salesforce has great means of delivering translatable metadata - custom labels, Translation Workbench. Mostly everything can be translated. But what about data? Currently, Salesforce doesn't have means to translate data. Why would they? Does it even make sense to translate the data, rather than having it the way it was inputted? Sometimes, there is a presentation part of data, that need to get to the end user, some custom development, that relies heavily on the texts, stored in the Objects, rather than in Metadata. This use-cases might be:

  • Communities
  • Public Community pages
  • Public Sites

Whenever you display the data to the external end-user, outside of Salesforce, you might want to get it translated to be pleasantly presented. Sometimes, it might even be the case for the internal users.

Is Lexico for me?

If:

  • you custom development or package is heavily data-driven
  • you have large chunks of text data in your Objects
  • you want to make your data in the Objects multilingual

Lexico is for you.

How Lexico works?

It adds a Custom Object - Data Translations, where it stores translations for each individual field of each object you need translations for. All you need to do, to translate data in code is to add the following line of code, pass the language name, and a list of record you want to translate.

final List<SObject> translatedRecords = Lexico.getInstance().translate('language', <list of SObjects to translate>);

Lexico performs a single query for the whole chunk of SObject you've passed, replaces all the fields, which have translations with translated values, and caches the result in a static map, so that subsequent calls for the same records wouldn't result a query.

TODO

  • Finish Readme
  • Expand Lexico

lexico's People

Contributors

4an70m avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.