Angelino Posted March 6, 2022 Share Posted March 6, 2022 Hello, For a website we using processwire as CMS, now it is single language in Dutch we want to add FR en EN to it. But how to get these FR and EN tabs above the content labels? Even my template files are not accessable in the site translations files? I added all language packages and i added the languages french en english in the setup aswell. Thanks in advance. Link to comment Share on other sites More sharing options...
Klenkes Posted March 6, 2022 Share Posted March 6, 2022 You probably have to convert each field from singlelanguage to a multilanguage field in the fields settings. Not a big deal! i.E. Textarea to Textarea(Multilanguage) Link to comment Share on other sites More sharing options...
Gideon So Posted March 6, 2022 Share Posted March 6, 2022 Hi @Angelino Yiu need to install language support core module first. Then install multilanguage text field, multilanguage textarea field and multilanguage page name. Then you can add new language to your site at setup -> Language Gideon Link to comment Share on other sites More sharing options...
Angelino Posted March 6, 2022 Author Share Posted March 6, 2022 Ok, i think i found it. For some reason the hidden checkbox was checked. I unchecked it and now i got my language tabs working. Now i need to find how to setup a custom field, i guess with __("......") or _x(".......") Link to comment Share on other sites More sharing options...
aagd Posted March 6, 2022 Share Posted March 6, 2022 1 hour ago, Angelino said: Now i need to find how to setup a custom field, i guess with __("......") or _x(".......") These are translatable strings. Means text in templates that is translateable via the Language module, but that's only editable in template code. Usually that's used for UI elements like buttons and other static texts. For editable content you need to create a (multi-language) field via Setup > Fields (or change existing text/textarea fields to their multilanguage versions). Link to comment Share on other sites More sharing options...
horst Posted March 6, 2022 Share Posted March 6, 2022 3 hours ago, Angelino said: Now i need to find how to setup a custom field, i guess with __("......") or _x(".......") Your text field binding in the templates should need no code changes. PW does recognize in which language a page (field) currently is accessed from the actual $user, and passes the correct values to it, according to your page- and field- language settings. (Show active language content, on empty show nothing or default language content) The __() functions are only used and needed for hard coded strings in your template (view) files. Link to comment Share on other sites More sharing options...
AndZyk Posted March 7, 2022 Share Posted March 7, 2022 Here is the documentation for how to use multi-language with ProcessWire: https://processwire.com/docs/multi-language-support/ What you are looking for are probably multi-language fields, like mentioned before. Sadly the video explaining this topic is private nowadays. ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now