pleribus Posted August 29, 2014 Share Posted August 29, 2014 Hi, Just wanting to ask for best practice when it comes to uploading localised audio and video files for a given language. Right now I'm using language fields for all text based content, but have audio and video content that needs to be served up based on current language. Is there an existing module that allows for file fields to share similar functionality to the languagetextfield type? Any pointers would be appreciated. Link to comment Share on other sites More sharing options...
Macrura Posted August 30, 2014 Share Posted August 30, 2014 since those are file fields, i would recommend to use the built in tags function of the file field, and then tag each file with the language code; then you can get the correct file with a findTag.. or getTag Link to comment Share on other sites More sharing options...
pleribus Posted August 30, 2014 Author Share Posted August 30, 2014 Okay, Guess I was hoping for something slightly more strict / rigid in terms of say a tab or drop down of available languages to set language, but tags may work as a fallback. Just requires the people entering content don't accidently add any typos to the tag, and know the available options. Thanks, I'll try this route. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted August 30, 2014 Share Posted August 30, 2014 You can go for Language-Alternate fields. 3 Link to comment Share on other sites More sharing options...
pleribus Posted September 3, 2014 Author Share Posted September 3, 2014 Language Alternate fields is the ideal solution in this case. Requires a little more manual setup (creating the extra fields and adding to each template), but works as advertised. Only downside is that it doesn't fall back to default values if blank it seems, but this is a non issue for us. Thanks. Link to comment Share on other sites More sharing options...
Soma Posted September 3, 2014 Share Posted September 3, 2014 On 9/3/2014 at 8:26 AM, pleribus said: Language Alternate fields is the ideal solution in this case. Requires a little more manual setup (creating the extra fields and adding to each template), but works as advertised. Only downside is that it doesn't fall back to default values if blank it seems, but this is a non issue for us. Thanks. Well, it works and does fallback to default, but I think not in 2.4 stable. https://github.com/ryancramerdesign/ProcessWire/issues/292 Link to comment Share on other sites More sharing options...
pleribus Posted September 5, 2014 Author Share Posted September 5, 2014 Thanks for the tip Soma. So how do I go about getting the fix for this? Do I need to upgrade to a non stable branch of processwire? What are the implications / dangers of using non stable branch? Link to comment Share on other sites More sharing options...
adrian Posted September 5, 2014 Share Posted September 5, 2014 Quote Do I need to upgrade to a non stable branch of processwire? What are the implications / dangers of using non stable branch? PW 2.5 (https://github.com/ryancramerdesign/ProcessWire/tree/dev) will be released within the next couple of weeks. Many of us have been using the dev version in production with no problems. It always pays to test though, so if you don't have a test server setup, rename your existing wire folder to wire-old or similar so you can revert quickly should there be any problems. 1 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