$swiftling_language ) { $swiftling_host = swiftling_target_host( $swiftling_host_format, (string) $swiftling_slug, $swiftling_language['locale'], $swiftling_domains ); $swiftling_state = '' !== $swiftling_host && isset( $swiftling_checks[ $swiftling_host ]['state'] ) ? (string) $swiftling_checks[ $swiftling_host ]['state'] : ''; $swiftling_hosts[ $swiftling_host_format ][ $swiftling_slug ] = array( 'language' => $swiftling_language, 'host' => $swiftling_host, 'state' => $swiftling_state, ); $swiftling_ready[ $swiftling_host_format ] = $swiftling_ready[ $swiftling_host_format ] && 'ok' === $swiftling_state; } } $swiftling_states = array( 'ok' => array( 'published', __( 'Leads here', 'swiftling' ), '' ), 'no_answer' => array( 'failed', __( 'Does not answer', 'swiftling' ), __( 'Add it at your host, or where you bought the domain. A new one can take up to a day.', 'swiftling' ) ), 'no_https' => array( 'failed', __( 'No secure certificate', 'swiftling' ), __( 'Turn on a certificate for it at your host. Most hosts do it for free.', 'swiftling' ) ), 'other_site' => array( 'failed', __( 'Another site answers', 'swiftling' ), __( 'It shows another site, or sends visitors on to another address. Add it to this site at your host as an alias, not as a redirect.', 'swiftling' ) ), '' => array( 'untested', __( 'Not checked', 'swiftling' ), '' ), ); if ( ! isset( $swiftling_languages['targets'][ $swiftling_lang ] ) ) { $swiftling_lang = (string) key( $swiftling_languages['targets'] ); } $swiftling_target = '' !== $swiftling_lang ? $swiftling_languages['targets'][ $swiftling_lang ] : null; $swiftling_types = swiftling_content_types(); // The lists by the content they belong to, in the order of the content types; each with the object // keys of the parts of its word. $swiftling_groups = array(); $swiftling_owners = array(); foreach ( swiftling_base_lists() as $swiftling_key => $swiftling_list ) { $swiftling_list['owners'] = array(); foreach ( array_keys( $swiftling_list['parts'] ) as $swiftling_index ) { $swiftling_list['owners'][ $swiftling_index ] = swiftling_base_owner( $swiftling_key, $swiftling_index ); $swiftling_owners[] = $swiftling_list['owners'][ $swiftling_index ]; } $swiftling_groups[ $swiftling_list['group'] ][ $swiftling_key ] = $swiftling_list; } $swiftling_groups = array_replace( array_intersect_key( array_fill_keys( array_keys( $swiftling_types ), array() ), $swiftling_groups ), $swiftling_groups ); // How many words each language has translated, for its tab. $swiftling_done = array(); foreach ( $swiftling_languages['targets'] as $swiftling_slug => $swiftling_language ) { swiftling_prime_slugs( $swiftling_owners, $swiftling_language['locale'] ); $swiftling_done[ $swiftling_slug ] = count( array_filter( array_map( 'swiftling_get_slug', $swiftling_owners, array_fill( 0, count( $swiftling_owners ), $swiftling_language['locale'] ) ) ) ); } $swiftling_screen = admin_url( 'admin.php?page=swiftling-addresses' ); Ui::screenHeader( array( 'crumb' => __( 'Settings', 'swiftling' ), 'title' => __( 'URLs', 'swiftling' ), 'description' => __( 'How the addresses of your pages read in each language.', 'swiftling' ), ) ); ?> __( 'URLs saved.', 'swiftling' ) ) ); ?> __( 'Not saved yet: not every address leads to this site. The site keeps the addresses it has; below is what to do.', 'swiftling' ) ) ); ?> __( 'Every address leads to this site. Save changes to switch to them.', 'swiftling' ) ) ); ?> __( 'Checked. Not every address leads to this site yet; below is what to do.', 'swiftling' ) ) ); ?> __( 'Words saved. Addresses with the earlier words lead to the new ones.', 'swiftling' ) ) ); ?> __( 'Some words were not saved, because they are taken. They show below as you typed them.', 'swiftling' ) ) ); ?>

__( 'Choose the languages first.', 'swiftling' ), 'link' => array( __( 'Add languages', 'swiftling' ), admin_url( 'admin.php?page=swiftling-languages' ) ), 'compact' => true, ) ); ?> __( 'Translated addresses need pretty permalinks: with plain ones, addresses name pages by their number.', 'swiftling' ), 'link' => array( __( 'Permalink settings', 'swiftling' ), admin_url( 'options-permalink.php' ) ), 'compact' => true, ) ); ?> __( 'No list of this site starts its addresses with a word of its own.', 'swiftling' ), 'compact' => true, ) ); ?>
$swiftling_lists ) : ?> $swiftling_list ) : ?> $swiftling_list['name'], 'hide_empty' => false, ) ); /* translators: %s: number of terms. */ $swiftling_size = sprintf( _n( '%s term', '%s terms', $swiftling_count, 'swiftling' ), number_format_i18n( $swiftling_count ) ); $swiftling_sample = get_terms( array( 'taxonomy' => $swiftling_list['name'], 'hide_empty' => false, 'orderby' => 'count', 'order' => 'DESC', 'number' => 1, ) ); $swiftling_sample = is_array( $swiftling_sample ) && $swiftling_sample ? swiftling_term_language_url( $swiftling_sample[0], $swiftling_lang ) : ''; } else { $swiftling_count = (int) wp_count_posts( $swiftling_list['name'] )->publish; /* translators: %s: number of published posts of a content type. */ $swiftling_size = sprintf( _n( '%s published', '%s published', $swiftling_count, 'swiftling' ), number_format_i18n( $swiftling_count ) ); $swiftling_sample = get_posts( array( 'post_type' => $swiftling_list['name'], 'posts_per_page' => 1, 'no_found_rows' => true, ) ); $swiftling_sample = $swiftling_sample ? swiftling_post_language_url( $swiftling_sample[0], $swiftling_lang ) : ''; } ?>
labels->name : $swiftling_group ); ?>
rewrite['slug'], '/' ) . '/' ); ?> $swiftling_part ) : ?> > /

$swiftling_rows ) : ?>
>

3 /* translators: %d: number of languages. */ ? sprintf( _n( '%d language', '%d languages', count( $swiftling_waiting ), 'swiftling' ), count( $swiftling_waiting ) ) : wp_sprintf( '%l', $swiftling_waiting ); ?>

<IfModule mod_headers.c>
<FilesMatch "\.(woff2?|ttf|otf|eot)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
location ~* \.(woff2?|ttf|otf|eot)$ {
	add_header Access-Control-Allow-Origin "*";
}
sprintf( /* translators: %s: link to the Permalinks settings screen. */ esc_html__( 'Language folders need pretty permalinks. Until you choose a structure other than Plain or one starting with index.php on the %s screen, pages open with ?lang= in either case.', 'swiftling' ), '' . esc_html__( 'Permalinks', 'swiftling' ) . '' ), 'compact' => true, 'class' => 'swiftling-format__permalinks', ) ); ?>