-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Custom translation files #56
Comments
Hello, I think that's a good idea. I'm a bit busy at the moment but I'll try to have a look at this soon! |
@lonnieezell I did a quick test - my first idea is simply to expose the path where to find the files as a option of
This is easy to implement however it's a "all or nothing" option, i.e. every locale file that you doesn't exist in this custom directory will be treated as missing (it will never look into the default directory if this option is set). This means if you want to customize French and also have the default English, you have to copy both fr.php and en.php into your custom directory. Another approach would be to provide a map for each file, something like:
Then it would only look into your custom directory if it wants to load the file for French translations ( The two options are not mutually exclusive and if necessary I guess I could implement both. Since you are the one with an actual use case for this feature, what's your opinion? |
Thanks for looking into this! I don't personally have any need for location at this time. However, the first option seems the easiest to use from a developer's perspective. Could you combine the two options? Like in the first one, pass in a custom directory path for any new files, but merge that with the existing one so that it has a fallback directory? The only problem there is knowing what language the directory is supposed to be for, so maybe something like:
|
First off - thanks for this. This is working very well for us!
It would be awesome to be able to tell the RRule class to use a different translation file for a specific locale. This way if we want things to be worded differently, we can simply copy the appropriate local file, make the changes, and tell the script on the fly where to find the new translation file.
This would be a huge help to me currently as I'm trying to get the results closer to what the app designer mocked up in my API.
The text was updated successfully, but these errors were encountered: