Jump to content

How to setup a exsisting website to multilanguage


Angelino
 Share

Recommended Posts

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

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(".......")

 

hidden.png

tabs.png

Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...