Localization

The following generator functions are available in the Localization provider:

┌────────────────────┬───────────────────┬────────────────┐
│ Generator Function │ Available Locales │ Unique Entries │
│             String │             Int64 │          Int64 │
├────────────────────┼───────────────────┼────────────────┤
│ address_complement │                 2 │              3 │
│     address_format │                 2 │              5 │
│               city │                 2 │            104 │
│            country │                 3 │            729 │
│           district │                 2 │            104 │
│             locale │                 1 │              2 │
│           postcode │                 2 │              2 │
│              state │                 2 │             76 │
│      street_format │                 2 │              5 │
│      street_prefix │                 2 │             12 │
│      street_suffix │                 2 │              5 │
└────────────────────┴───────────────────┴────────────────┘

Impostor.addressFunction
address(n::Integer = 1; kws...)
address(options::Vector{<:AbstractString}, n::Integer = 1; level::Symbol, kws...)
address(mask::Vector{<:AbstractString}; level::Symbol, kws...)

Generate n or length(mask) addresses based on options or mask according to the required level. For example, let level = :country_code and options be the required country codes to generate addresses for, e.g. ["BRA", "USA"], the expected output will contain only addresses (in their specific formats) for location in Brazil ("BRA") and the United States ("USA"). Other values may be passed as level.

Parameters

  • n::Integer = 1: number of addresses to generate.
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :state_code: option level to be used when using option and mask-based generation.
source
Impostor.address_complementFunction
address_complement(n::Integer = 1; kws...)

Parameters

  • n::Integer = 1: number of address complements to generate.

Kwargs

  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.cityFunction
city(n::Integer = 1; kws...)
city(options::Vector{<:AbstractString}, n::Integer; level, kws...)
city(mask::Vector{<:AbstractString}; level::Symbol, kws...)

Parameters

  • n::Integer = 1: number of country codes to generate.
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :state_code: Level of values in options or mask when using option-based or mask-based eneration.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.countryFunction
country(n::Integer = 1; kws...)
country(options::Vector{<:AbstractString}, n::Integer; level::Symbol, kws...)
country(mask::Vector{<:AbstractString}; level::Symbol, kws...)

Generate n or length(mask) country names.

Parameters

  • n::Integer = 1: number of country name entries to generate.
  • options::Vector{<:AbstractString}: vector with with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :country_code: Level of values in options or mask when using option-based or mask-based generation.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.country_codeFunction
country_code(n::Integer = 1; kws...)
country_code(options::Vector{<:AbstractString}, n::Integer; level::Symbol, kws...)
country_code(mask::Vector{<:AbstractString}; level::Symbol, kws...)

Generate n or length(mask) country codes.

Parameters

  • n::Integer = 1: number of country codes to generate.
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :country_code: Level of values in options or mask when using option-based or mask-based eneration.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.country_official_nameFunction
country_official_name(n::Integer = 1; kws...)
country_official_name(options::Vector{<:AbstractString}, n::Integer; level::Symbol, kws...)
country_official_name(mask::Vector{<:AbstractString}; level::Symbol, kws...)

Generate n or length(mask) country offiical names.

Parameters

  • n::Integer = 1: number of country official names entries to generate.
  • options::Vector{<:AbstractString}: vector with with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :country_code: Level of values in options or mask when using option-based or mask-based generation.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.districtFunction
district(n::Integer = 1; kws...)
district(options::Vector{<:AbstractString}, n::Integer; level::Symbol, kws...)
district(mask::Vector{<:AbstractString}; level::Symbol, kws...)

Parameters

  • n::Integer = 1: number of district names to generate.
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :district_name: Level of values in options or mask when using option-based or mask-based eneration.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.postcodeFunction
postcode(n::Integer = 1; kws...)

Parameters

  • n::Integer = 1: number of postcodes to generate.

Kwargs

  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.stateFunction
state(n::Integer = 1; kws...)
state(options::Vector{<:AbstractString}, n::Integer; level::Symbol, kws...)
state(mask::Vector{<:AbstractString}; level::Symbol, kws...)

Parameters

  • n::Integer = 1: number of country codes to generate.
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :country_code: Level of values in options or mask when using option-based or mask-based eneration.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.state_codeFunction
state_code(n::Integer = 1; kws...)
state_code(options::Vector{<:AbstractString}, n::Integer; level::Symbol, kws...)
state_code(mask::Vector{<:AbstractString}; level::Symbol, kws...)

Parameters

  • n::Integer = 1: number of state codes to generate.
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :country_code: Level of values in options or mask when using option-based or mask-based eneration.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.streetFunction
street(n::Integer = 1; kws...)
street(options::Vector{<:AbstractString}, n::Integer; kws...)
street(mask::Vector{<:AbstractString}; kws...)

Generate n street names. Note that for option and mask-based generation the only valid options to provide are country_codes.

Parameters

  • n::Integer = 1: number of street names entries to generate.
  • options::Vector{<:AbstractString}: vector with with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.
source
Impostor.street_prefixFunction
street_prefix(n::Integer = 1; kws...)

Kwargs

  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.street_suffixFunction
street_suffix(n::Integer = 1; kws...)

Kwargs

  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source