Download the PHP package zeroseven/z7-countries without Composer

On this page you can find all versions of the php package zeroseven/z7-countries. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package z7-countries

Countries :jp: :us: :fr: :es: :it: :ru: :gb: :de:

This TYPO3 extension offers the possibility of a flexible country configuration for single tree content.

Languages that exist in TYPO3 can be split up to match single countries. You can therefore limit content of different languages to only be displayed for chosen countries. For a clean and easy to understand administration in the backend, this extension uses dynamic icons, country filters and more.

Example usage:

Let‘s take the German language. With this extension it’s possible to subdivide the language “German” into the countries “Germany”, “Austria” and “Switzerland” in order to limit selected content to individual countries. In this example, in addition to the German language URL of the website (example.com/de/schweiz), other URLs are automatically available:

Now, if a content element, a page or any other database record has exclusively been made available for the country Switzerland, it would only be available under example.com/de-ch/schweiz (note the de-ch) but not on the other example urls.

In this example, the content restricted to Switzerland could also be available in other translations, so it can be viewed in other languages:

How it works:

With every country that is assigned to a language, the language is made available under an additionally altered base URL. This consists of the ISO Code of the language and a country parameter.

When accessing a page with a language country combination like that in the URL, all database queries on configured tables will be made with these country restrictions in mind.

:bulb: Therefor the href in the site configuration should only contain the language (e.g. "fr" instead of "fr-FR").

SEO:

There’s no need to worry here. Aside from the URLs, the hreflang as well as the lang attribute of the page are getting altered. This way, the search engines find a perfectly fine identifiable and correct country variation. To put it simple: there will be no duplicate content complaints.

Examples for hreflang tags:

For administrators:

Installation:

Get the extension via composer: composer require zeroseven/z7-countries

Configuration:

  1. On root level (uid:0), create a various amount of countries as data records.
  2. Assign countries to the languages via the TYPO3 site config.
  3. Extend desired data record types for restricting to countries. Example:

:bulb: The database analyzer in the install tool will automatically add the needed fields to your database when running it.

Extend country objects

To extend the country object, extend the database table tx_z7countries_country. The country model automatically provides a set,get, has and a is method for each field.

Example:

Country template condition

ViewHelpers

With the extension's own ViewHelpers it's possible to create country dependent structures in a template. For this‚ you can use any parameter that is available in the Country object.

TypoScript conditions

In the TypoScript setup, settings can be defined depending on the selected country. For this, the Country Model is available for Conditions.

Editor:

Adjust country settings for a data record:

If the data record type has been made available for country configuration, the record can now be restricted to specific countries.

Language/country check:

When creating or editing a data record, there will be checks if it’s even displayed under current country settings in the chosen language. This way, you can avoid any wasted efforts on misleading configuration.

Country filter:

In the list module, there’s a filter available for you. Now you can check which content is available for any chosen country without any effort.

Automatic redirect:

When the start page is called up, an attempt is made to redirect the user to a suitable language/country URL according to his browser settings. For this, the following conditions must be met:

  1. The domain is called without any path
  2. The referer has the same URL origin
  3. No bot could be determined

If you want to disable or override the automatic redirects, take a look at TYPO3's middleware API.

Example of disabling the redirect feature:

The configuration must be provided in Configuration/RequestMiddlewares.php of an extension:


All versions of z7-countries with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^10.4 || ^11
jaybizzle/crawler-detect Version ~1.2
doctrine/dbal Version ^2.13.0
ext-json Version *
php Version ^7.4 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zeroseven/z7-countries contains the following files

Loading the files please wait ....