bbeer Posted March 13, 2014 Posted March 13, 2014 Hi I need to access the following label in another language. How could I call a specific language? $fieldTitle = wire('fields')->get($fields_id)->label; your help is much appreciated!
Soma Posted March 13, 2014 Posted March 13, 2014 There was posts about this already. Search with Google. I'm on mobile.
Soma Posted March 13, 2014 Posted March 13, 2014 http://processwire.com/talk/topic/3601-field-label-language-problem/
Soma Posted March 13, 2014 Posted March 13, 2014 And here's a example module you can install and then use: in templates $label = $fields->getLangLabel("body"); in modules or function scope. $label = wire("fields")->getLabelLang("body"); https://gist.github.com/9534415
bbeer Posted March 14, 2014 Author Posted March 14, 2014 soma thanks sorry made a mess on install now getting an error on installation. Cannot redeclare class HelperFieldsLanguageLabel (line 2 of /site/modules/HelperFieldsLanguageLabel.module) any idea?
Soma Posted March 14, 2014 Posted March 14, 2014 soma thanks sorry made a mess on install now getting an error on installation. Cannot redeclare class HelperFieldsLanguageLabel (line 2 of /site/modules/HelperFieldsLanguageLabel.module) any idea? Cannot redeclare class HelperFieldsLanguageLabel Means you have the module two times installed or put in modules folder... like the class already exists.
kongondo Posted March 14, 2014 Posted March 14, 2014 soma thanks sorry made a mess on install now getting an error on installation. Cannot redeclare class HelperFieldsLanguageLabel (line 2 of /site/modules/HelperFieldsLanguageLabel.module) any idea? Bbeer, you have asked a similar question about a month ago and got a similar answer from me as Soma's...PHP errors are consistent....If it says Cannot redeclare class....it means exactly that whatever the module, or code you are using.... http://processwire.com/talk/topic/5504-urgent-help-needed/
bbeer Posted March 14, 2014 Author Posted March 14, 2014 thanks kongondo that was it, one should use his brains. still new to all this, sorry.
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