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.address — Functionaddress(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.
Impostor.address_complement — Functionaddress_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 nolocaleis provided, the current session locale is used.
Impostor.city — Functioncity(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 inoptionsormaskwhen using option-based or mask-based eneration.locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.
Impostor.country — Functioncountry(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 inoptionsormaskwhen using option-based or mask-based generation.locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.
Impostor.country_code — Functioncountry_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 inoptionsormaskwhen using option-based or mask-based eneration.locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.
Impostor.country_official_name — Functioncountry_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 inoptionsormaskwhen using option-based or mask-based generation.locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.
Impostor.district — Functiondistrict(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 inoptionsormaskwhen using option-based or mask-based eneration.locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.
Impostor.postcode — Functionpostcode(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 nolocaleis provided, the current session locale is used.
Impostor.state — Functionstate(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 inoptionsormaskwhen using option-based or mask-based eneration.locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.
Impostor.state_code — Functionstate_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 inoptionsormaskwhen using option-based or mask-based eneration.locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.
Impostor.street — Functionstreet(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.
Impostor.street_number — Functionstreet_number(n::Integer = 1)Parameters
n::Integer = 1: number of street numbers to generate.
Impostor.street_prefix — Functionstreet_prefix(n::Integer = 1; kws...)Kwargs
locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.
Impostor.street_suffix — Functionstreet_suffix(n::Integer = 1; kws...)Kwargs
locale::Vector{String}: locale(s) from which entries are sampled. If nolocaleis provided, the current session locale is used.