Code Monkey home page Code Monkey logo

madmax983 / sfdx-l18n-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lekkimworld/sfdx-l18n-plugin

0.0 2.0 0.0 30 KB

A plugin for the Salesforce CLI built by Mikkel Flindt Heisterberg to allow you to update the localization values on the created users object. This allows you to set the user interface language, the locale of the user (date/time formats) and the timezone of the user from the command line.

License: MIT License

JavaScript 100.00%

sfdx-l18n-plugin's Introduction

sfdx-l18n-plugin

A plugin for the Salesforce CLI built by Mikkel Flindt Heisterberg to allow you to update the localization values on the created users object. This allows you to set the user interface language, the locale of the user (date/time formats) and the timezone of the user from the command line.

Setup

Install from source

  1. Install the SDFX CLI.
  2. Clone the repository: git clone [email protected]:lekkimworld/sfdx-l18n-plugin.git
  3. Link the plugin: sfdx plugins:link .

Install as plugin

  1. Install plugin: sfdx plugins:install sfdx-l18n-plugin

Example Usage

Below example will use the plugin to change the user language for from default language to English. Same approach can be used to set the locale and timezone.

Create project $ sfdx force:project:create -n foo target dir = /Users/mheisterberg/m create foo/sfdx-project.json create foo/README.md create foo/config/project-scratch-def.json

Enter project $ cd foo

Create a new scratch org - by default created with users locale - Danish in my case $ sfdx force:org:create -s -a org1 -f config/project-scratch-def.json Successfully created scratch org: 00D7E0000000sWFUAY, username: test-a2ngdpsb8cvs@mheisterberg_company.net

List SFDX commands $ sfdx --help Usage: sfdx COMMAND

Help topics, type sfdx help TOPIC for more details:

force tools for the Salesforce developer l18n Various commands for user localization (l18n) plugins manage plugins update update CLI

List languages in scratch org� $ sfdx l18n:list:languages -u test-a2ngdpsb8cvs@mheisterberg_company.net Engelsk = en_US Tysk = de Spansk = es Fransk = fr Italiensk = it Japansk = ja Svensk = sv Koreansk = ko Kinesisk (traditionel) = zh_TW Kinesisk (forenklet) = zh_CN Portugisisk (Brasilien) = pt_BR Hollandsk = nl_NL Dansk = da Thailandsk = th Finsk = fi Russisk = ru Spansk (Mexico) = es_MX Norsk = no

Get the current config for the user (shows language is set to Danish) $ sfdx l18n:user:get -u test-a2ngdpsb8cvs@mheisterberg_company.net Locale: da_DK Language: da Timezone: Europe/Paris

Set language to English $ sfdx l18n:user:set -u test-a2ngdpsb8cvs@mheisterberg_company.net --language en_US Success

Get the new config for the user (shows language is now English) $ sfdx l18n:user:get -u test-a2ngdpsb8cvs@mheisterberg_company.net Locale: da_DK Language: en_US Timezone: Europe/Paris

Open the scratch org (will open in English) $ sfdx force:org:open (org opens in English)

JSON output supported sfdx l18n:user:get -u test-a2ngdpsb8cvs@mheisterberg_company.net --json {"language":"da","locale":"da_DK","timezone":"Europe/Paris"}

sfdx-l18n-plugin's People

Contributors

lekkimworld avatar

Watchers

James Cloos avatar Mark Masterson 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.