Fork me on GitHub

Question about languages in a pnAPI mod...  Bottom

  • Getting oh-so-closer to pnAPI!! Don't laugh, but...I'm proud of myself! ;) Mainly because I got rid of a whole slew of unnecessary if/else's and chopped about 20% of the code overall...which noticably sped up the mod...

    Anyway...back to the task at hand...

    I've got the language defines separated into their respective files (admin.php, user.php, etc...) and stored in .../pnlang/eng/... ok...the defines are parsing nicely, and this works out fine.

    Question 1: If I translate the language files and drop them into their respective ../pnlang/xxx directories, will PN simply use the language that it needs for the site it's installed to (based on Admin -> Settings) ...or do I have to do something more within the code for that to work?

    Question 2: Assuming PN uses mod language files based on the settings made in Admin -> Settings, I changed my test-site's language setting to a language that will not be included with the mod, but the text still displayed fine. Ok, cool...it didn't "break" the language, but obviously, there's some precedence... So, if the site's language isn't included with the mod, does PN just use the language files for the first valid language directory it comes across, or are languages prioritized behind the scenes? If there's a priority, which language gets it?

    Thanks for another assist,

    John
  • 1. As long as you've coded it properly, then you just need to add them..
    2. I think it defaults to English, but I'm not sure.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Excellent! Two good news's in a row...

    Thanks!
  • I'm not positive on #2, but #1 I'm pretty sure of..

    --
    Home Page | Find on Facebook | Follow on Twitter
  • 2. If the site is in another language (that the mod doesn't have), unless it has changed while I had my back turned, it'll not be translated so you'll see all your

    _BLABLA1
    _BLABLA2
    etc...

This list is based on users active over the last 60 minutes.