kregg
kregg

Reputation: 65

SEO of multi-language website

i am building a website with a multi-language feature.

it would be hard if each of the pages are to be created manually for each language so instead, i have different php files for each language containing define() statements like

<?php
    define("hello", HELLO);
    define ("there", THERE);
?>

and the webpages will only contain constants in between the HTML tags like

    <h1><?php echo HELLO; ?></h1>
    <h2><?php echo THERE; ?></h2>

and depending on the language choice of the user, the language php file (en.php, fr.php..) will be included in the page.

by default, the en.php (english text) will be the included file.

i'm not sure about this but will search engines still be able to index the page? like it would see the english text and not just the constants?

also, is there a way so that the other translations will also be indexed?

thanks!

Upvotes: 1

Views: 949

Answers (2)

RageZ
RageZ

Reputation: 27313

The search engines are crawling your website like a normal user, they won't be able to see the constants. Those defines are on server side and cannot be access by search engines.

Also I advise you to take a look Zend_Translate, I think it would be a bit more flexible then building define.

Upvotes: 4

Joonas Pulakka
Joonas Pulakka

Reputation: 36577

Search engines see what the users see (as long as you're not putting texts in images or something like that). To ensure that the whole site gets indexed, including all the different language versions, create a sitemap.

Upvotes: 3

Related Questions