Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION How to make multi language site?
#5
INSTALLATION

Download the plugin from http://get-simple.info/extend/plugin/i18n/69/, unzip it and copy it to the plugins directory of your GetSimple installation.
  • in your template(s) replace get_navigation(return_page_slug()) withget_i18n_navigation(return_page_slug()) and get_component(id) withget_i18n_component(id) and get_header() with get_i18n_header().

  • You can change the default language on the I18N view.
USAGE
Go to the Pages tab and enter the two-letter language code of your default language and press Save.
Create another language version of a page by creating a new page and (after opening the page options) naming its URL/Slug as that of the default language version + "_" + language code, e.g. for german pages:
  • index -> index_de

  • my-page -> my-page_de
When you have created one page of a language, you can just click on the [+] symbol at the right hand side of an empty cell in the table on the Page Management page.
To display a page in another than the user's prefered language, a link likehttp://my.site/my/page?lang=de (German) can be used. You can use the helper functionreturn_i18n_lang_url to create a link to the current page in another language:
<a href="<?php echo htmlspecialchars(return_i18n_lang_url('de')); ?>">In deutsch</a>

You can also use the helper function find_i18n_url to create a link to another page in a specific language:
<a href="<?php echo htmlspecialchars(find_i18n_url('my-page','my-page-parent','de')); ?>">Meine Seite in deutsch</a>

To switch the language for the current session, add links like http://my.site/?setlang=de(German) to your template or home page. You can use the helper function return_i18n_setlang_url to switch the language, but stay on the same page:
<a href="<?php echo htmlspecialchars(return_i18n_setlang_url('de')); ?>">deutsch</a>


from http://mvlcek.bplaced.net/get-simple/i18n?lang=en
Reply


Messages In This Thread
How to make multi language site? - by razvan-rat - 2015-04-17, 04:22:38
RE: How to make multi language site? - by Carlos - 2015-04-17, 05:13:06
RE: How to make multi language site? - by Timbow - 2015-04-17, 07:48:10
RE: How to make multi language site? - by Timbow - 2015-04-19, 02:05:27
RE: How to make multi language site? - by Timbow - 2015-04-20, 06:45:09
RE: How to make multi language site? - by Timbow - 2015-04-20, 17:24:27
RE: How to make multi language site? - by Oleg06 - 2015-05-27, 03:12:23
RE: How to make multi language site? - by Oleg06 - 2015-05-27, 06:26:38
RE: How to make multi language site? - by Tyblitz - 2015-07-08, 08:31:19



Users browsing this thread: 1 Guest(s)