Posts: 12
Threads: 1
Joined: Jun 2016
I'm sorry to flood like this but I'm desparate right now because I have to translate every product page in 10 languages by manually if I can't find a way to do what I've mentioned above. I saw only one solution with adding language suffix components but I have 40 different words it means I will have 400 components, I don't think get-simple can handle this nor I'd be able to edit those components easily in future. There must be another way to do this, I'm sure. Thanks.
Posts: 538
Threads: 12
Joined: May 2013
With ItemManager this is no problem, why don't you try it? Just create for each language (prefix) a category with same slug, so you can use I18N_DEFAULT_LANGUAGE from i18n for determine current language then load your items and display.
Posts: 538
Threads: 12
Joined: May 2013
2016-06-29, 01:50:41
(This post was last modified: 2016-06-29, 01:51:42 by Bigin.)
And besides, you can after setting up your categories even automate the importing process from pages to items just with a simple API call ;-)
Posts: 12
Threads: 1
Joined: Jun 2016
I never gave a shot to that plug-in. I'll try it if there'll be no solution only using i18n. Thank you Bigin.
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2016-06-27, 22:38:29)barknezz Wrote: Hello mvlcek!
This plug-in is really life saver but I was failed to add multi-language php tags to components as you mentioned on this page: http://get-simple.info/wiki/plugins:i18n...uages_i18n
The steps I followed:
1- Added new languages to admin/lang such as de_DE, ru_RU
2- Added <?php i18n("WHOWERARE"); ?> to my footer component.
3- Added "WHOWEARE" => "Who We Are in spesific language?" to all language files that I have.
English version works like charm, however when I set my language to another language on website (not on admin panel), it keep showing me only English version, not other language versions.
I don't really know if I do something wrong. How can I fix this? I will create detailed product pages in 20 different languages so I do REALLY need to know how to fix this :| Thank you very much.
Ok, here's the How to use language files with the I18N plugin:
- create a directory /plugins/texts/lang (a dummy plugin for your site's texts)
- add language files to this directory, with the two-letter language codes used by the I18N plugin, e.g. de.php
Code: <?php
$i18n = array(
'TEXT1' => "Deutscher Text"
);
- add the following code to the top of your template file (try to load language files according to the user's language preference, the default language as defined on the I18N Pages view in the administration and English as last fallback):
Code: <?php
$preferedLanguages = return_i18n_languages();
foreach ($preferedLanguages as $l) {
i18n_merge('texts', $l);
}
i18n_merge('texts', return_i18n_default_language());
i18n_merge('texts', 'en');
?>
- add <?php i18n('texts/TEXT1'); ?> whereever you want a localized text ('texts/', because your keys are in the texts plugin, here with key 'TEXT1') in your template.
If you have pages that are the same in all languages except some terms, you can use placeholders in the default language page instead of creating pages for all languages: - install the DynPages plugin
- create a component text with the following content:
Code: <?php global $args; i18n('texts/'.$args[0]); ?>
- use {% text TEXT1 %} (here with key 'TEXT1'), whereever you need in your default language pages, e.g. the following content for a product specification:
Code: Notebook 1503X:
{% text processor %}: Core I5
{% text speed %}: 2.5MHz
{% text size %}: 30cm x 20cm x 2cm
...
Posts: 1,928
Threads: 88
Joined: Apr 2010
2016-07-09, 06:16:34
(This post was last modified: 2016-07-09, 06:17:48 by Oleg06.)
Whether it is possible to make the reference count on first level the menu? I want to use it in the menu class.
Posts: 6
Threads: 1
Joined: Jul 2016
hello, I have a problem with a site I'm using I18N.
The site is in Italian, i installed the plugin and created pages in English and put them in the menu, but the english link go to italian site... i don't know why
the site:
Italian: http://www.tecenergysrl.it/test/?lang=it
English: http://www.tecenergysrl.it/test/?lang=en
Posts: 1,928
Threads: 88
Joined: Apr 2010
PHP 7.0.9-1~dotdeb+8.1
Code: Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; I18nNavigationItem has a deprecated constructor in /home/u915147/getsimple-themes.ru/basket/plugins/i18n_navigation/frontend.class.php on line 349
Posts: 12
Threads: 1
Joined: Jun 2016
2016-08-22, 20:44:57
(This post was last modified: 2016-08-22, 20:45:36 by barknezz.)
Hey again,
My website's default language is English and all the default pages such as "index" "products" are in English (en), yet when I enter the website, I see Turkish versions of it. I have to switch language manually to see it in English. I did try with incognito mod, nothing has changed. Also I'm on localhost, there should not be a way that the script detects my IP and redirect me to Turkish website. How to solve this problem? Thanks
Posts: 6
Threads: 1
Joined: Mar 2011
2016-08-23, 16:25:08
(This post was last modified: 2016-08-23, 16:26:01 by mittus.)
Posts: 185
Threads: 8
Joined: Apr 2012
2016-09-02, 17:25:09
(This post was last modified: 2016-09-07, 22:12:16 by morvy.)
another bug here,
when I create nested special pages (_special_gallery), menu structure in i18n get's corrupted. When I want to open parent to see newly added child page, it hides all links below instead of showing links inside the parent. When I click on "Show all pages", I can see newly added page, but under random special page. In frontend everything seems OK, but in backend it's a mess.
so I did 3 screenshots of menu manually opened, show all pages and navigation structure (website behaves like navigation structure, but editing special pages is confusing as it doesn't show up correctly in Pages)
Posts: 36
Threads: 5
Joined: Aug 2013
2016-09-16, 23:54:12
(This post was last modified: 2016-09-29, 16:44:10 by wdburgdorf.
Edit Reason: solved
)
... I wish this plugin had it's own category on the forum, can't possibly read through 39 pages ...
Anyway, my issue:
My site has two languages, I created the page structure for both. But I currently use only one (German), the other language pages (English) are all empty. The language selector is hidden in the frontend, and default language is all set to 'de'. But still, sometimes when opening the site, a page in English comes up. Perhaps the browser is set to English, I don't know, and it doesn't matter, because it should work for all visitors, whatever their browser setting.
Is there a simple way to disable one language? Ideally there'd be a way to disable individual pages, so a page where one language is disabled comes up in the default language.
Thanks!
EDIT: The below solution by morvy did it. Thank you!
Posts: 185
Threads: 8
Joined: Apr 2012
I use this in gsconfig:
define('I18N_SINGLE_LANGUAGE',true);
define('I18N_IGNORE_USER_LANGUAGE',true);
Posts: 7
Threads: 0
Joined: Apr 2016
I am facing an issue with Navigation Structure.
I have a simple structure Parent -> Children, only 1 level deep. Every time I open and edit Child page the structure brakes and this Child page jumps on the Parent level.
I can put it back manually via Navigation Structure but next time I edit this page - situation repeats.
Posts: 11
Threads: 2
Joined: Feb 2013
Hello! How is it possible to make some menu elements not a link but only holder for lower levels links.
See screenshot:
Navigation code for menu looks like this:
PHP Code: <!-- Nav --> <nav id="nav"> <ul> <?php if (function_exists('get_i18n_navigation')) {echo(get_i18n_navigation(return_page_slug(),0,2,I18N_SHOW_MENU));} else { get_navigation(return_page_slug()); } ?> </ul> </nav>
Posts: 57
Threads: 2
Joined: Feb 2015
Posts: 6,266
Threads: 181
Joined: Sep 2011
Heh I didnt know php even did that...
Posts: 11
Threads: 2
Joined: Feb 2013
(2016-10-12, 07:24:07)smsHH Wrote: Maybe this is helpful for you:
http://get-simple.info/extend/plugin/ts-nolink/780/
Works like a charm! Thank You!!
Posts: 53
Threads: 11
Joined: Mar 2015
Your home page on i18n installation appears to be mangled where it mentions the string (twice as far as I can see)
|\s*language= RewriteRule ^(.*)? $1?lang=en [QSA,DPI]
Posts: 36
Threads: 5
Joined: Aug 2013
(2016-09-17, 01:17:13)morvy Wrote: I use this in gsconfig:
define('I18N_SINGLE_LANGUAGE',true);
define('I18N_IGNORE_USER_LANGUAGE',true);
I added that, and at first it seemed to work. But now, on another PC, I get the wrong language again. What else can I try? Thanks!
Posts: 2
Threads: 1
Joined: Nov 2016
guys is there a way to combine news manager plugin and i18n plugin to post news in different languages? news manager plugin has only 1 page in its config (page to display news) so all languages would end up there.
Posts: 1,928
Threads: 88
Joined: Apr 2010
2016-11-09, 19:32:47
(This post was last modified: 2016-11-09, 19:38:16 by Oleg06.)
you can try to use tags plugin News Manager
Pages output by tags (useful for multilanguage sites)
in component
<?php global $args; nm_show_tag($args[0]); ?>
on the page (ispolzovt plugin DynPades:
{% name_component tag %}
Posts: 4
Threads: 1
Joined: Jan 2015
(2016-09-02, 17:25:09)morvy Wrote: another bug here,
when I create nested special pages (_special_gallery), menu structure in i18n get's corrupted. When I want to open parent to see newly added child page, it hides all links below instead of showing links inside the parent. When I click on "Show all pages", I can see newly added page, but under random special page. In frontend everything seems OK, but in backend it's a mess.
so I did 3 screenshots of menu manually opened, show all pages and navigation structure (website behaves like navigation structure, but editing special pages is confusing as it doesn't show up correctly in Pages)
Hi morvy,
i am facing the same issue. Did you manage to find a solution?
Thanks!
Niki
Posts: 4
Threads: 1
Joined: Jan 2015
(2016-12-05, 02:00:22)neden Wrote: (2016-09-02, 17:25:09)morvy Wrote: another bug here,
when I create nested special pages (_special_gallery), menu structure in i18n get's corrupted. When I want to open parent to see newly added child page, it hides all links below instead of showing links inside the parent. When I click on "Show all pages", I can see newly added page, but under random special page. In frontend everything seems OK, but in backend it's a mess.
so I did 3 screenshots of menu manually opened, show all pages and navigation structure (website behaves like navigation structure, but editing special pages is confusing as it doesn't show up correctly in Pages)
Hi morvy,
my nav structure seemed to be messed up, too. I clicked on the filter options above (By Title, Hierarchical) and it all showed up right again. Is this the same for you?
Niki
Posts: 185
Threads: 8
Joined: Apr 2012
Hi neden,
no solution here, only a workaround - click on "Hierarchical" and then click it again .. it will resort all items in correct order
|