Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Bobby 1 year, 11 months ago.

Assisted by: Bobby.

Author Posts
February 10, 2023 at 8:05 pm #13009625

nathalieC-7

I created some HTM pages on HTML directory. Those pages are created because I need to upload 100+ external HTML files/pages to be hosted on the same WP website. The pages are bilingual, in English (eng directory) and French (fra directory).

I also created a custom header for those pages. but I don't know how to add the language switcher to it so it will work for the new HTML page, and will switch between English and French as it's currently similarly to the pages created on WP dashboard.

A long with the custom header, I will need the footer to be switching between languages as well. In the current WP pages, the header and the footer are switching automatically between the two languages as their elements are translated.

I created a language link to the HTML files, for the languages to be recognized. Attached is a HTML sample.

I am embeding PHP in the HTML files, should I created different headers and footers for different languages and include them in the related pages, or is there a way to take advantage of WPML plugin features/functionality without coding new headers and footers.

I am actually working on DEV environment and the URL is not accessible to external end users.

Please let me know if you need more information and/or clarification.

Thank you in advance for your help.

amal

WP_HTML_Sample.png
Current_Lang_Switcher.png
WP_HTML_Pages.png
February 10, 2023 at 8:58 pm #13009785

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi there,

WPML uses the database to create the translations and link them with each other.

As you are doing this with HTML hardcoded pages, you will require custom work which at the moment is outside our supports scope

For this we suggest contacting one of our 3rd party contractors that specialize in custom work with WPML
https://wpml.org/contractors/

you can also review our WPML Hooks library
https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

February 13, 2023 at 3:21 pm #13021965

nathalieC-7

Hi Bobby,

Thak you for your response.

Could you know what would be the time frame for the third party contructor to help me with the customization of the WPML plugin and make it work the way I want it? I need this to be done by the end of this week. I have THML pages ready and need the header and the footer to be set so they work with both languares similarly to the WP pages.

Regards,
amal

February 13, 2023 at 7:14 pm #13024039

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi Amal,

I can't say for sure as this would depend on them.

A quick solution here could possibly be to add a custom static switcher that looks like our WPML switcher and link it to the other pages with a hardcoded link as you mentioned above as utilizing WPML for this would require to use of our Hooks however I am not sure how they will behave as we use the database to pull translation data.

The topic ‘[Closed] Get language switcher fro HTML pages’ is closed to new replies.