Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Filters · mod_geoip
  • Reference
  • Frontend developer
  • Geolocation
  • Template filter
  • Query
  • Identifier

ip2country

Module

mod_geoip

Return the lowercase ISO country code associated with an IP address.

The input can be a textual or tuple IP address. The result is undefined when the address cannot be located.

For example:

{{ "8.8.8.8"|ip2country }}

Edit on GitHub

Related documentation

Filters

ip2geo

Return geographic information associated with an IP address.

Filters

filter_geomap_distance

Calculate the great-circle distance between two locations in kilometers.

Filters

admin_filter_count

Count active filters in admin overview query arguments, for example to display the number of selected filters on the overview's Filter…

Filters

translated_texts

Check all properties of a map, list or resource. Returns a list of all properties that are translated (have a #trans{} record) and their…

Filters

extract

Extract a specific property from each item in a list.

Filters

filter_by

Filter a list of items based on a property value and optional predicate.

Filters

survey_page_options

Check the list of blocks and collect all options for that page.

Filters

sum

Sum a list of numbers.

Filters

trans_languages

Return a list of all languages present in the given translated text ( #trans{} record).

GitHub © 2026 Zotonic