Jump to content

Search the Community

Showing results for tags 'Language'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Started my first demo multilingual site last night and I'm really pleased with the ease of setup. I had a 1 page demo with 5 languages and a language switcher and menu running relatively quickly. Before I get too far down the road, I thought I'd ask some of you more experienced multilingual devs what I should be aware of? Off the top of my head... Do any multi-lingual SEO modules exist or should I build my own fields here? I normally use MarkupSEO but not sure yet if it supports multi-lingual. Are any of the Pro fields NOT multilingual? I'm using a single tree with language options as tabs on each field. Is this a better method than having a separate tree for each language? Are image Description fields multilingual? Anything else I should be aware of? For example I read recently that web forms using FormBuilder should be built separately for each language. That's not a huge deal but a good example of something I hadn't anticipated. Cheers P
  2. I was trying to fix an error earlier which was preventing a series of if statements from working. Basically I have a button called "Product Drawing" which needs localising depending on the current language session. Eventually got it working - I had a bracket in the wrong place. Curious as to why both these work though. On the sample below. each echo is surrounded by curly braces. <?php if ($page->files->count()) foreach($page->files->findTag('drawing') as $file) { if($user->language->name == 'default') {echo "<a href='$file->url' class='uk-button uk-button-primary'>Product drawing</a>";} if($user->language->name == 'french') {echo "<a href='$file->url' class='uk-button uk-button-primary'>Le plan du produit</a>";} if($user->language->name == 'german') {echo "<a href='$file->url' class='uk-button uk-button-primary'>Produktzeichnung</a>";} if($user->language->name == 'spanish') {echo "<a href='$file->url' class='uk-button uk-button-primary'>El dibujo del producto</a>";} if($user->language->name == 'italian') {echo "<a href='$file->url' class='uk-button uk-button-primary'>Il disegno del prodotto</a>";} } ?> On the sample below, there are no curly braces around the echo <?php if ($page->files->count()) foreach($page->files->findTag('breakingreport') as $file) { if($user->language->name == 'default') echo "<a href='$file->url' class='uk-button uk-button-primary'>Breaking strain report</a>"; if($user->language->name == 'french') echo "<a href='$file->url' class='uk-button uk-button-primary'>Le test de rupture</a>"; if($user->language->name == 'german') echo "<a href='$file->url' class='uk-button uk-button-primary'>Bruchfestigkeit bericht</a>"; if($user->language->name == 'spanish') echo "<a href='$file->url' class='uk-button uk-button-primary'>Informe resistencia</a>"; if($user->language->name == 'italian') echo "<a href='$file->url' class='uk-button uk-button-primary'>La rottura rapporto ceppo</a>"; } ?> Should the second piece work?
  3. Hey there, I'm very new to Processwire but allready in love! So far my experience was great but I ran into an internal server Error (500) and my error logfile logged: Error: Exception: Unknown language (in P:\xampp\htdocs\xxx\wire\modules\LanguageSupport\Languages.php line 343) (I know XAMPP is not the best developing area but for simplicity reasons I like it...) The line 343 in my Languages.php(unchanged by me) is: if(!$language instanceof Language || !$language->id) throw new WireException("Unknown language"); in the function of public function setLanguage($language) { if(is_int($language)) { $language = $this->get($language); } else if(is_string($language)) { $language = $this->get($this->wire('sanitizer')->pageNameUTF8($language)); } if(!$language instanceof Language || !$language->id) throw new WireException("Unknown language"); $user = $this->wire('user'); $this->savedLanguage2 = null; if($user->language && $user->language->id) { if($language->id == $user->language->id) return false; // no change necessary $this->savedLanguage2 = $user->language; } $user->language = $language; return true; } I have no clue what the problem is and as far as I know when I closed the website the day before everything was working just fine. I copied the whole folder to "develop" further on my laptop. The next day I got the error mentioned above when requesting the site. (On the original and the copy) Any suggestions what I should do?
  4. I'm building a multi-language site and wanted to know the best way to deal with images. Because on a multi-language site, they may want a different image for a different language, especially if the image has text in it. What is the best way to deal with this? Should I make another image field for spanish and if they don't put anything there, just use the english image and if there is a spanish image, then use that image for spanish?
  5. I have to languages - english and russian. I need russian language to be set as default for admin panel. How to do it? Thanks!
  6. I would like to be able to fetch the labels for fields in a language different than the current logged in user. For field values that's easy // p is page, l is language, and f is field $p->getLanguageValue($l, $f); I'm looking for something like $fields->getLanguageValue('en', 'length'); The only solution I know of is to save the current user language, iterate through the languages by setting the user language and fetching the value, and then restore the user language.
  7. Hi there I want to render a page in a particular language, somehow like $page->render('de'). How can I achieve that? Some background information to my problem: I wrote a module that generates HTML newsletter emails. From the PW backend I use that module to send emails, which are represented by pages that are rendered and sent off. Now I want to control the email language. The email shouldn't be just rendered in the language of my backend user account, of course. Any help is much appreciated. Best, Daniel
  8. There's a permission for allowing editor to use the translator in PW 2.73. I could need this but it doesn't work. It shows the "Language" in the menu but when opening the page it says no entries to show. Anybody has some experience using the lang-edit permission for editor?
  9. I enabled language support and now I get "Trying to get property of non-object" for lines like: <p><?= $page->text ?></p> The content is still available in the backend. On another page I get text from the frontpage with: <?php $somepage = $pages->get(1); ?> ... <p><?= $somepage->text ?></p> This outputs the text although on the frontpage it doesn't. I also do this on the header. On the frontpage I added some fields that are thus "shared" among all pages the content fails with the error for `<?= $page->text ?>` but not for `<?= $pages->get(1)->text ?>`. On a third page everything works as expected All three pages have different templates. Additionally if the field is wrapped with frontend editing like so: <p><edit text><?= $page->text ?></edit></p> The page source will end up like this: <p></edit></p> Before having to dig deep into this: Any idea what it could be? I var_dumped $page and that gives an object.
  10. Hello, Forgive this newbie, but I could not find a solution for this "simple" issue. I have a multi-language website and I would like to output the current language's name on my menu. I was able to generate the language switcher/navigation without a problem, but I cannot figure out how to echo the current language. Thanks!
  11. I have a web page where all templates have Norwegian (default language) and English (secondary language, ID 1036). Many of my pages have been imported using the API, and so I used a method from How to set language = active via API? to set the secondary language active. Now I want to output a list of pages where the secondary language is inactive. I have tried the following without luck: $pages->find("template=basic-page, status1036=0") But this gives an error: Field does not exist: status1036 Is there another way that makes this possible? Additional information: basic-page was just an example, I should have been more clear from the beginning. I have multiple templates and a totalt of 170 000 pages to check.
  12. Here's my first serious attempt at a PW module. I have the need that pages shouldn't be "published" in all languages at once, so I've put together a PageLangPublish module. It adds both buttons for publishing/unpublishing of each language to the page tree and status icons (from image fields added to each page in admin/languages) next to the page title in the tree. You can find the module at github under https://github.com/BitPoet/PageLangPublish I've probably done a lot of things quite awkwardly (even incorrectly) there, so I'd be grateful for any pointers and ideas. The module also adds a hookable isLanguageViewable method to the Page class. Usage example: $topnav = array(); foreach($homepage->children as $item) { if( $item->isLanguageViewable($user->language) ) { $topnav[] = "<a class='topnav' href='{$item->url}'>{$item->title}</a>"; } } echo implode(" | ", $topnav); Here's a screenshot:
  13. Hello, I am running PW 2.7.2 with the image-extra module, which I installed with the multi-language support. But I found it irritating to have all image extra fields twice on the backend because I do not intend to add a second language. So I disabled the multi-language descriptions of that module, but the fields did not vanish. Maybe I played a little with that language support module - uninstall, install again - and now the setup -> languages Tab shows " This page has no process assigned". And now the Image-extra-fields do not contain the content I add. I had a look at the database and found a caption field like " {"0":"","1018":"Steinguss"} " I can edit the field after the "0": and get the result on the page. But on the backend the default-field points to something ending up with _1016 and the second field with _1018. How can I repair this?
  14. Preamble: Processwire is awesome and the freedom of development is quite insane. Issue: When using CKEditor and entering a URL, it says: "Enter a URL, email address, anchor, or enter word(s) to find a page." I have installed the multilingual module, so I need to target: /en/contact/ and /de/contact/ and /lt/contact/ Adding a link to the text, I can only add one of those 3 contact links. When copying the text (including links) into another body (another language), then I need to edit each link to set the correct language - every time. Idea for solution: Is it possible to allow entering either: 1. The page id (then the module could read this and create a URL), or: 2. A placeholder for the language, e.g. "*contact" (then the module could replace the asterisk with the language identifier) Thanks in advance for your ideas.
  15. Working with a multi-language site. I have a field 'province' with the list of provinces in Options in English and in French tab. The field is selectable in the 'municipality_page' template as a dropdown box. I have an Ajax call to retrieve the choice of the province to list the municipalities of that province. Everything works well in English, however, I am having an issue with the French, I don't know if it is because the French provinces uses accents and dashes in them. I was able to make it work for 9 out of 12 provinces with the following code. $province = $_GET['prov']; if(strpos($province, "-") !== false){ $choice = str_replace("-", "|", $province); } else { $choice = $province; } $entries = $wire->pages->find("template=municipality_page, province%=$choice"); Just can't figure out how to get 'Colombie-Britannique', 'Nouvelle-Écosse' and 'Territoires du Nord-Ouest' to be found. I tried manually with the code below, but it didn't even worked. It also doesn't seemed to be a typo in the field. $entries = $wire->pages->find("template=municipality_page, province%=Colombie-Britannique"); What is missing in the code to be able to find those 3 provinces?
  16. Hi, I am looking for a new cms to devellop the new version of my site. I have used joomla and modx but it was not really for me. maybe processwire is more for me? Can I do the following with this CMS? Use data in an external database (same server or other then site) to populate data on pages. (lists and detail pages) Add, delete, adapt entries in that database (through forms on frontend of the site) use my php and sql “knowledge” to adapt/create the above. (create custom php forms and php pages) create a multinlangual site (easy to add a language/tanslate file to be able to add languages) (optional: give users the option to use facebook/google or site registration) This for an event database website where: there is a hierarchical category system users can create an account/change their password logged in users can add/update/delete and search events. visitors (also not logged in) can add,search events. normal users can only acces front end even when logged in admin users can acces front and back end tnx for any replies
  17. Hello all. I have a question that I know must have a simple answer but I've been unable to find it in the forums or documentation. I want to throw a styled bit of markup around the links to switch language on a given page, but I don't want to output the markup if there is only the default language available and therefor no links to output. I was approaching this by trying to count the languages for the page which are marked in the settings tab as active, but I can't seem to find the correct syntax for that. I'm using the basic recommended method to generate the links but nothing in these lines helped me find the answer. foreach($languages as $language) { // if user is already viewing the page in this language, skip it if($language->id == $savedLanguage->id) continue; // if this page isn't viewable (active) for the language, skip it if(!$page->viewable($language)) continue; // set the user's language, so that the $page->url and any other // fields we access from it will be reflective of the $language $user->language = $language; // output a link to this page in the other language $language .= "<li class='language' style='float: left; display: inline; padding: 1em;'><a href='$page->url'>$language->title</a></li>"; } I tried count($languages) but that includes inactive languages in the count. I tried count($page->viewable($language)) and a few other inventive lines with no results until I decided to finally just ask here. I'm of course open to using some other calculation to determine whether to output my code. Appreciate the help!
  18. Hi all, We have this huge website (over 7000 pages and a few dozen templates). We've used TextLanguage and TextAreaLanguage fields for all textual fields, and all image and file fields have their own description input boxes for different languages too. Now we'd need to export all pages and send them to our translator so they can translate all site contents with their specialized programs, and a way to import the translations back to our site alongside the content in original language. Has anyone done anything similar to this? How did you solve it? Maybe there already is a solid way to do this, or an idea we've not thought of yet. Thanks for any thoughts!
  19. Hi folks, I have a site set up for a festival of events over the next 5 years. Each year (page with children) in the site is in a different location and we want to use the Multi-Language Support to toggle between the native language of the location and English. I have set up the Multi-Language Support stuff fine but the only issue is that it's applying it to the whole site whereas I only need to use specific languages in specific sections. For example, for a Portuguese section a URL might be http://www.domain.com/pt/designing-respect/home/ whereas I need something like http://www.domain.com/designing-respect/pt/home/ instead and on another section for a Chinese section a URL might be http://www.domain.com/designing-politics/cn/home/ so the language support is being applied to the section rather than all of them to the same whole site. This is also the case with using multi-language title fields; it's adding all the options to all the pages whereas I need them only on the relevant sections (so within the Chinese section you'd get the English title field and the Chinese title field; not all the language title fields). Any ideas?
  20. My site has three language, default, chs, eng. Default language is cht (traditional chinese) I have an order template (no output template). Structure look like An order will be created after a successful paypal transaction has been made. When I'm on default language, the order creation is working properly. However, if I switched to chs or eng The order number field i.e. title field cannot be inserted. I just saw an empty title field. All other fields are populated values properly, except the order number Here is my page creation code $p = new Page(); $orderByUser = $user; $p->template = "order"; $counter_name = $order_number_prefix . date('Y'); $number = $this->modules->get('DatabaseCounters')->next($counter_name, 1, 5000); $ordernumber = $counter_name . '-' . sprintf("%06u", $number); $p->title = $ordernumber; $p->member = $orderByUser; $p->payment_method = $session->get("payment_method"); $p->order_time = $session->get("order_time"); $p->paypal_transaction_id = $session->get("paypal_transaction_id"); foreach($session->get("cart_item") as $cart_item) { // create order items $item = $p->order_items->getNew(); $item->product_id = $cart_item['id']; $item->product_name = $cart_item['name']; $item->product_price = $cart_item['price']; $item->product_quantity = $cart_item['quantity']; $item->save(); $p->order_items->add($item); $transaction_amount += ($cart_item['price'] * $cart_item['quantity']); } $p->transaction_amount = $transaction_amount; $p->of(false); $p->save();
  21. Hello is anyone else having trouble with the multi language tabs after upgrading to 2.7.2. (from 2.5)? Mine all show at the same time noe (see attached screenshot). Maybe someone has an idea how I could fix that? Thanks in advance for any help/suggestions!
  22. I have a problem that my Select Options Field doesnt change the language on the frontend, when I am changing the language on the frontend. My Field Settings looks like this But the Frontend shows me always the default language when accesssing these urls ... www.domain.com/form www.domain.com/de/form www.domain.com/it/form Why it doesnt change the language on the frontend?
  23. Hi everyone, I got a serious problem with the LanguageSupport module. I already found a forum thread regarding the topic, but it doesn't work in my case. https://processwire.com/talk/topic/7207-can%C2%B4t-install-languagesupport/ My problem is, that "ProcessLanguage" can get installed but "LanguageSupport" doesn't. I can uninstall ProcessLanguage via the Module configuration, but that doesn't change anything. I always get this Error: I've found a "Languages" Page under Admin/Setup and deleted it with this code https://processwire.com/talk/topic/7207-can´t-install-languagesupport/?p=69520 I also deleted the LanguageSupport module via FTP from the server and uploaded the newest version of it. The error still occurs. I'm still a beginner and don't know how to deal with it. Please help me! I'm using the Blue-VR Site Profile made by Gayan Virajith, if that information helps. Thanks a lot in advance, Leo
  24. Ok, so I have been reading up on how to "change the default language" in Processwire and most tips mentioned to change the Guest user's language to the one you'd want. Unfortunately, this does not work well for me. In fact, when I var_dump the contents of $user->name,$user->language->name I get different results depending on where I am in the site. I have set the language of user Guest to the new manually created language Dutch (nl). Not being logged in and visiting the root, results in the language name being default. Not being logged in and visiting another page, the results in the language name being nl. I am at a loss of why this happens but it's preventing me from setting the Guest users language to determine which language should be shown when not logged in, because the homepage ALWAYS reverts to the deault language which is NOT the one set for the Guest user. This is processwire 2.5.3. So... when my client asks me to change the default language of an already existing website, how do I do this without having to re-organise the whole language stuff? Imagine that this client can't make up his mind and wants to be able to change the language in which the site opens about every three months. Is this possible or am I doomed to go through the whole "upload Dutch language files into the Default language"-thing?
  25. Hi guys, I already developed some smaller projects with PW and I like it! Now for the first time I'm trying to build a multilanguage site. I have the default English and German. Everything works smoothly. When I output $page->title I get the current title in English or German, depending which language I'm in right now. However if I go for: $page->name, I always get the English name. Does anybody know why this is happening and how I can get it to return the name of the page in the currently active language? Thanks for any hint or solution! Cheers Sascha
×
×
  • Create New...