javascript - Own website built - how to provide it in another language? -


situation: have developed website/webgis, showing map , describing points of interest. website based on plain html, css, , javascript, no content-management system or provider used. text on website provided in german.

goal: provide english version of website, best, if possible toggle button.

problem: have never done before , not aware possibilities there , practices commonly used. searched on internet, times answers given specific website-provider.

ideas: these ideas came mind, work.

  • copy whole website code, reset information in english , save e.g. "index.html/en", use toggle button link english version. why think possible is, whole code below 1.5mb.
  • make global variable set german/english , integrate wherever text used if-condition, testing language selected , using specified language. think more effort, incorporating if-conditions.

what way choose or have other ideas?

you want separate data , presentation later start. create content management system holds strings supported languages.

for each page requested dynamically create page using correct cms language server side , serve user.

the many systems out there this. choice largely depend on programming language comfortable with.

as seeing correct visual data remember set correct html language attribute browser knows how handle pages.

another challenge face styling. each language require style tweaks ensure labels , content don't break layout.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -