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. Hello, I am starting using processwire and after reading some documentation, i still can´t find anything explaining how i can do translations on my website. I saw an example with <?php echo "" . __("STRING_TO_TRANSLATE")."" ?>, but i cant find where can i make this translation on processwire. It is need one specific module? Best regards Ricardo Leite
  2. hi to all members! i use processwire 2.4 (my server php is 5.3) i try to translate my home template but i cant get all the translatable fields in admin, for example in the folowing code i dont get the "Philosophy" word for translate, and this happens in the other words to and to all other templates <h4><?php echo __("Our"); ?> <span><?php echo __("Philosophy"); ?></span></h4> here is an image of the field not there any idea why this might happen, thank you!
  3. Hi all, I know I can get the current user navigation language using this query: $currentUser = $pages->get("template=user, id=".$user->id); $currentUserLanguage = $currentUser->language->name; or directly: $currentUserLanguage = $user->language->name; Now, if I am viewing the site with this user and change navigation language using the language switcher the value of $userLanguage changes accordingly. However, the REAL user language as seen in the user profile on the admin panel doesn't change. So, my question is: how can I get the user profile language as set in the user profile? Thank you!
  4. I while ago, I started a site on dev branch 2.5.19, and built out a bilingual site in English and French. My default language is English and I added French as a second language. I'm using LanguageSupportPageNames and my homepage names are "/" for english and "/fr" for French. Everything works great. But... now the client wants to change the site so that French is the default language. I've tried: setting the Guest user's language preference to French - no effect. detecting the URL and manually setting the $user->language in _init.php variations on naming the homepage "en" and "fr" istead of "/" and "fr", but the redirect still seems to redirect the homepage URL of the default language to "/" even if I've specified "en". I've looked at the LanguageSupportPageNames settings and have tried both the recommended option and including the redirect in combination with URL detection. Still can't get it working. Does anyone have any recommendations? I really don't want to rebuild the site from scratch just to reset the default language :-( Thanks for your help, -Brent
  5. Adding a new language in pw 2.5.14 throws this error: Error: Call to a member function setIsDefaultLanguage() on boolean (line 144 of /Users/user/Sites/domains/blog/htdocs/wire/modules/LanguageSupport/LanguageSupport.module) Works in 2.5.3 and 2.5.5
  6. 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:
  7. Hello everyone! I just added a new language to an already functioning system, and some fields are not accepting the version in this new langauge. The tab for the language appears "lighter" as seen in the picture, and when text is inputted and "Save" is clicked, it goes back to being empty. Any suggestions??? THANK YOU!!
  8. Hi there, I'm trying to add multi-language support to my site. The site is already online and the database gets changed everyday. On my localhost dev, I looked at adding the multi-language support and noticed that it altered the database by adding new fields. Hence my newbie question : how shall I operate? I understand that I should keep modifying my database on my dev branch by adding the full multi-language support, but how will I eventually throw this online without loosing the new database updates happening in the meantime? For the moment, on my localhost, I've installed a fresh PW brand new version, I have imported my freshest database backup, I've changed many things (templates, modules, adapted some code so it works with my new PW version), and now I want to tackle this multi-language issue. But see, I haven't touched the database in my previous changes so far, so I wasn't too worried about throwing it all online again, but now, that's a different story to me So if you have a little time to point me towards the good direction, that'd be great! Thanks! Edit : SORRY for the forum admins, I've just noticed my wrong topic line : Upgrade an existing single language WEBSITE (not file) with multi-language new version. And I can't seem to have the possibility of editing it myself...
  9. Hi, noob here. Maybe this has already been addressed, but I can't find it in the forums. Also, is this really where one may file a defect report? Anyway, implementing a multi-language site. I started out single language. Created body, summary, headline fields in some of the templates. Created pages w/ templates, populated some of these fields. Then I tried to change, say, summary, from Text to TextLanguage and got 1 green and 2 red bands at the top when saving: Field type changed Field type change failed. Database reports: SQLSTATE[HY000]: General error: 1364 Field 'data1027' doesn't have a default value Error changing fieldtype for 'test', reverted back to 'FieldtypeTextLanguage' (Woah! They're formatted here! I might see data getting clobbered during a field type transition, but this is an good ol' error. With a field that's already used in templates, I can't edit the field unless I remove it from every template. With a brand new field, just pressing [save] again works clears the error. Basically, changing the field type toward multi-language doesn't work, yet it's allowed. p.s. Niceties galore! What a superb CMF!!!
  10. https://processwire.com/api/multi-language-support/code-i18n/ In the documentation about Code Internationalization the following is mentioned: Translatable strings In order to make a string translatable in your template or module code, you just have to wrap the original string in a $this->_() or __() function call: $out = $this->_("Live long and prosper"); // syntax within a class $out = __("Live long and prosper!"); // syntax outside of a class Inside my methods the first example of syntax in a class seems to work fine. Somehow the following code seems to throw a 500 Internal Server Error which states: Parse Error: syntax error, unexpected '$this' (T_VARIABLE) Example: class SomeModuleName extends WireData implements Module, ConfigurableModule { /** * Returns gender type * * @static * @return string */ private static $gender = array( 1 => $this->_("Male"), 2 => $this->_("Female"), ); } I can image since the module is not initialized or constructed yet that $this is not available at that spot. Any tips on how to be able to make those values multilanguage?
  11. Hello everyone, I have posted about this issue before and didn't get any answers, i think it's because i didn't explain properly what my problem was. I'll try to explain as detailed as possible, as i think this case might help others with the same situation. I have setup a site with custom made templates and multi-language support. I'm using a single tree approach with multi language features: Multi-LanguageUrls, Fields and also static translation. So far, everything is good. In my website i have a Home Page that serves as the welcome page. In it, you have a welcome message and two links, one for the site in Spanish (the default language) and one for the site in English. As i am using multi language page names, the link for the spanish website points to: <a href="nosotros-concepto">Sitio en Español</a> This is the actual "first page" of the site, after the welcome. The English site link looks like this: <a href="about-us-concept">Site in English</a> The problem is this last link still takes me to the Spanish "nosotros-concepto" and the url looks like this: localhost/mywebsite/es/nosotros-concepto Both links take me to the same Spanish page. I think i have something conceptually wrong, and i would very much appreciate any comments or help on this issue. Anyone else encountered something like this? Thank you all!! Julian
  12. Hello everyone, I started using Processwire a couple of days ago so i'm very new, and i couldn't be happier with how easy and practical it is, so first of all, i'd like to thank the creators of this amazing CMS. In one of my projects i have a home page which works as a welcome. It has two links, one for the site in the default language (spanish) and one for the site in a different language (english). The link takes you to "about-us-concept" page which is the first page of the actual site. When i link to just the "about-us-concept" page it takes you to the page in the default language, the url looks something like this: "http://localhost/prenovanew/es/about-us-concept/". Now, when i try to link the other button to "en/about-us-concept/" it still takes me to the first one, and the url still looks like this: "http://localhost/prenovanew/es/about-us-concept/". If i manually change the "es" for "en" in the url, the site changes to english. So my question is, how do i setup the links for navigation on a language? I think maybe i'm catching a concept erroneously, or i'm doing something wrong. Help will be much appreciated!! THANKS EVERYONE! Julian
  13. Hello @ all, I am new to Processwire and I am struggling for a while with this problem. I have setted up a multilingual site with a language switcher. The switcher works fine except on the homepage. It seems the aliases for the different languages (German: startseite, English: home) will not be taken on the homepage. If I switch to the other language on the homepage it doesnt work - it wil be always in German. The aliases will not be added to the homepage url so it is always the root url and this maybe causes the problem. I found this in the explanation: Please note that the URL for the default-language homepage is always your site's root URL, regardless of what you specify in the homepage name. This is intentional, as it's not desirable to have a homepage that produces a 404 or immediately performs a redirect to another URL. If populated, your homepage name for the default language is still applicable for the rest of the pages in your site. But how can I switch on the homepage to another language??? Do I need the language prepend in the urls (de, en,...)? I have searched in the forum but I couldnt find a solution to this problem. I use the latest version of Processwire. Can anyone point me into the right direction? Best regards Jürgen
  14. If I have a field for URL, say a page needs to link to another page. If the user is viewing the site in Spanish and that link points to the English version, does it know to output the spanish version of the link? And if so redirect the user to the spanish URL? Is the language the visitor views the site in, kept in sessions or something for it to do this? I'd rather not have 2 URL fields
  15. 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?
  16. hi there, this is my first post in the forums, and i got to say that up to this point working with process wire was a really easy-going experience. now i'm not quite sure if i'm just over-thinking my whole problem and i hope someone can help me. i have a setup of processwire running with german as default and english as additional language. i successfully implemented a language-switcher which works like a charm. now i want processwire to automatically check the visitors browserlanguage (basically on starting the session) and set it as default (if not german -> english) BUT keep open the possibility to do a manual switch. my first very, very simple piece of code (which terribly failed) looked like this (in my header template) if(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2) != 'de') { $user->language = $languages->get('en'); } now i know what the problem is (my header.inc gets included everytime and does this request even after a switch), but cant make my mind up about a proper solution... i also didnt find something about this very specific problem by using the search, but am really grateful about any advice best, overoon
  17. Hi everyone, I'm currently setting up my first multilingual project on a brand new 2.4 install. One of the things I tried to find out is how to change the default language. Fortunately I'm not the first one and I found good solutions. While reading through a lot of stuff I stumbled upon the suggestion to change the language of the guest user here and here. So I tried that and always get the error: "The guest role is required". Despite the error the language change gets saved. Two other users also reported this here and here. Like Relmos reports, after switching the guest user language, my site also displays in the default language. I checked with <?php echo $user->language->name; ?> in Chrome Incognito mode. This raises 2 questions: 1. Is setting the guest user language really affecting the language displayed on the home page or is it only determined by what language I set the default language to (like explained here)? 2. Can anybody reproduce the error message when switching language of guest user and what does it mean? The guest role is still there after switching. So I don't quite understand the meaning of that error message. Patiently awaiting partial enlightenment through this great community gerhard
  18. At http://processwire.com/talk/topic/545-progress-on-processwire-22-and-overview-of-multi-language-support/ I read that I can add fields to the language template, but can't find anywhere to do that. Has this documentation been superseded? How is it possible to add fields to a language? I want to add image (for a flag) and contact info. Also, why can't I edit a language from the list at Setup > Languages? I can only view the list or add a new language.
  19. Using PW 2.3.8 I was having a problem with the languages list under setup just showing an empty list - If I added a language I would see it grow but all that was displaying was the HR dividing the language entries. When I went to Admin > Modules > Languages I saw that the language field was the only one set to display, and it was somehow empty for all my languages. I added the name field and now it displays something. I've also found the listing under pages (Pages > Admin > Setup > Languages) where I can edit the language info. Just posting in case someone runs into the same problem and to suggest displaying a notice, or look for a non-empty field instead of outputting an empty row.
  20. Hi all! i have noticed that if enable the cache (for example on homepage), if I switch language the page is always the same, so i imagine that cache file is the same for any language. I wonder if there is any option that can save one cache file for each language. Alessio
  21. Hi all, i have some problems when trying to add more pages with asmSelect. I have a field called "categorie" that contains an array of pages ( imagine the behavior of categories ). If i try to add one page from that field all works fine, if i try to add more than one page i get this error: I found that "1007" is the id of the default language. Maybe could be useful for reproduce this error. The field config is like this: There is something that i am missing ?
  22. When I get in contact with processwire after a recommendation of a friend the first step after installing was a look in the database. Why? I had bad experiences with a shop-system I used, which ended up in digging and modification of the source code to make it work properly. Finally the biggest problem was the database with its questionable structure and data redundancy. I said goodbye to the shop-system after. With processwire I felt immediately in love because of its super slim and clear structured database without redundance of course from which results a lot of opportunities to grow. But since I use multilanguage support in processwire it makes me a little gripes when I see the way of Language Implementation in the database. About the conventional structure as an example: users are stored in pages and passwords are stored fields 'field_pass' which refers to the page (perfect) Structural changes since multilanguage support: pages and fields either have data (information about language) stored in column titles like 'name1007' or 'data1007' (not really perfect) What happened while making processwire multilingual? The tablefield in the database 'name' in table 'pages' wasn't unique anymore. 'name' from now on would have to be a field 'field_name' like 'field_titel' with its own databasetable. Same to status. The status of a page should be stored in 'field_status'. Possible solution: There exists already a field 'field_language' which stores the language of the page 'user'. This field could store easily the language of every page. Every page in every language should have its own database entry and unique id, even the rootpage with parent_id '0' should have this. All name and status columns should be outsourced to fields. Language relevant columns like 'data1007' in fields are obsolete. As a result every field becomes multilingual automatically, because it references to a unique site. I know that many people Ryan first of all have spent a lot of time and work to make this great system available. And I have a lot of respect before this people. I am happy to use processwire and I love it. But since I run in problems when I decided to switch an alternative language to the default language burrowing around in the database I started to think about some facts. I am pretty sure processwire will run in problems following the pursued way. On the way making processwire to the worlds best CMS the database as the heart of the system should be young, healthy and proper.
  23. Hi together! After installation i tried to install a language pack, but after dragging the file into the field i got an error with the following message: "Error writing to /tmp. Please define $config->uploadTmpDir and ensure it is writable." I tried to edit the config.php in the dir site and add the following line: $config->uploadTmpDir = dirname(__FILE__) . '/tmp'; But that is also not a solution. Does anybody know a solution for this problem? I have the problem with every kind of uploading a file. I am happy about every answer. Regards, Bluemagicon
  24. Hi, I have a problem with outputing months names in Polish language, Im using date filedtype, choosing date with datepicker and then outputing it in my template. i spend some times reading forums, in example this Topic: http://processwire.com/talk/topic/1751-cant-get-pw-to-output-german-month-names/ None of things work for me. in config.php $config->timezone = 'Europe/Poland'; in wire\modules\LanguageSupport\LanguageSupport.module if($locale != '0') setlocale(LC_ALL, 'pl_PL '); Still have english month names, what im doing wrong ? Regars Paweł
  25. I would like to create a language switch using Multi-language page names, but I have for each language a different domain. For example: domain.com instead of domain.com/en/ domain.de instead of domain.com/de I was finding various approaches and explanations, outdated and brand-new, but I think It would be great to gather everything in one place. So there are basically two questions: A) How to autodetect the browser language and redirect to the specific domain or default when not available. My approach would be to direct all domains to the default, in this case domain.com, and then let processwire redirect depending on the browserlanguage. B) How to create a manual switch with flags, to choose the language for the current page you are viewing, changing the path from: domain.com/about/ domain.de/ueber-uns/ Thanks a lot and I will update this post with the code we together brainstorm. Starting with connecting the domain to the language in processwire. <?php // Redirect to language fields of processwire if($config->httpHost == 'domain.de') { $user->language = $languages->get("deutsch"); } ?>
×
×
  • Create New...