Table or dictionary in code on a client for data that's not changed often? Suppose I have a table where data won't be changed frequently. Say, a table "currencies" with a list of currencies which I accept on my website. I'd change it once in a while probably.
What are pros and cons of keeping "currencies" directly in code in a web application, as a dictionary, as opposed to keeping them in a database in a table? How is it usually done?
Any data that can change should not be hard-coded into an app.  Especially if your app already uses a database.

Create a table to store currencies so you can update the list of currencies without needing to rewrite and redistribute the app.

As pointed out by Gareth Lyons in a comment, referential integrity relies on the database being self-contained; that is no references to code outside the database.  As an example, if you conduct transactions, you can maintain a list of valid currencies in a table like this:

CREATE TABLE dbo.Currencies
(
    CurrencyCode varchar(3) NOT NULL
        CONSTRAINT PK_Currencies
        PRIMARY KEY CLUSTERED
    , CurrencyName varchar(100) NOT NULL
);

INSERT INTO dbo.Currencies (CurrencyName, CurrencyCode)
VALUES ('East Caribbean Dollar', 'XCD')
    , ('Argentine Peso', 'ARS')
    , ('Armenian Dram', 'AMD')
    , ('Aruban Florin', 'AWG')
    , ('Australian Dollar', 'AUD')
    , ('Euro', 'EUR')
    , ('Azerbaijanian Manat', 'AZN')
    , ('Bahamian Dollar', 'BSD')
    , ('Bahraini Dinar', 'BHD')
    , ('Taka', 'BDT')
    , ('Barbados Dollar', 'BBD')
    , ('Belarusian Ruble', 'BYN')
    , ('Belize Dollar', 'BZD')
    , ('CFA Franc BCEAO', 'XOF')
    , ('Bermudian Dollar', 'BMD')
    , ('Indian Rupee', 'INR')
    , ('Ngultrum', 'BTN')
    , ('Boliviano', 'BOB');


And a list of transactions in a table list this:

CREATE TABLE dbo.CurrencyTransactions
(
    TransactionID int NOT NULL
        CONSTRAINT PK_CurrencyTransactions
        PRIMARY KEY CLUSTERED
        IDENTITY(1,1)
    , CurrencyCode varchar(3) NOT NULL
        CONSTRAINT FK_CurrencyTransactions_CurrencyCode
        FOREIGN KEY 
        REFERENCES dbo.Currencies(CurrencyCode)
    , DebitAmount DECIMAL(38,4) NOT NULL
    , CreditAmount DECIMAL(38, 4) NOT NULL
);


Attempting to insert a transaction into the table, whether within your app, or from any other source, will result in the currency code being validated:

INSERT INTO dbo.CurrencyTransactions (CurrencyCode, DebitAmount, CreditAmount)
VALUES ('CAD', 1000000, 0);


Attempting to do the insert above results in this error:


  Msg 547, Level 16, State 0, Line 45
  The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CurrencyTransactions_CurrencyCode". The conflict occurred in database "tempdb", table "dbo.Currencies", column 'CurrencyCode'.