-
Notifications
You must be signed in to change notification settings - Fork 21
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
app.htmlkit.localization.set is getting overridden #124
Comments
Hey, I can take a look tonight, when I am back home from work. I guess you are using the alpha? Or wich release version do you use exactly? |
@dev-onepayclick Did you set the source directory too? app.htmlkit.localization.set(source: currentDirectory) How does your folder structure look like? Something like this?
|
Hey, sorry for the late response. I fixed the folder structure. But then I get a different error. MissingKey.
so I called Also, the error message is MissingKey but it doesn't tell the key that is missing. |
No problem. 👍 Can you give me an example, what your translations.strings is build up, so I can reproduce your issue. That would be great. I think the second issue is on me. You can rename the folder I will fix it. |
Thank you very much 🙏🏻 |
I am not sure I understand. You don't need to use the localization. Can you expand your thought a bit more? What would you like to do? |
in case I need to avoid localizing it. and if I want it localized I do |
The language and region on your device is English Canadian, right? I wrote the localization to take the device settings at first. But I guess it is too prominent... Maybe it needs a change. I will rethink it. In your case it uses Portuguese only as fallback, you know. Is it what you want? Or should Portuguese be your first language of choice? By the way, I think Back to the Portuguese locale. The current order for the localization is environment locale > device setting > application setting (alias fallback). That said...
would force the localization to use Portuguese. or Html {
}
.environment(key: \.locale, value: Locale(tag: .portuguese)) Paragraph("hello")
.environment(key: \.locale) should do the same. |
Thats exactly how it works right now. |
Yep, it seems to work. Its running on Docker tho. Haven't tried on Mac. Yes I'm writing the webpage for a Portuguese audience :) Thanks for the tips 🙏🏻 I totally forgot about the .environment thing. |
Hi,
Even tho i'm setting the locale using
app.htmlkit.localization.set(locale: "pt")
I keep getting the error .missingTables because the currentLocale keeps defaulting to my browser's locale "en".Not sure it's a bug or I'm doing something wrong 😄
The text was updated successfully, but these errors were encountered: