Jump to content

Recommended Posts

Posted

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. 

Posted

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)

Posted

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

 

 

 

 

Posted

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

Posted
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).

Posted
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.

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
  • Recently Browsing   0 members

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