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

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

survey_page_options

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

Filters

filter_by

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

Filters

sum

Sum a list of numbers.

Filters

trans_languages

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

Filters

media_for_language

Filter a list of media items by their medium_language property, return the best matching with the current or given language. Only visible…

Filters

menu_ids

Returns all resource ids in a menu. Could return invisible and non existing resource ids. The returned ids are a flat list, the hierarchy…

GitHub © 2026 Zotonic