-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Cannot get this to work... #38
Comments
This has no effect on the user language. If you are debugging and want to test out how your site react to people with different locales, you need to manually define E.g. to test en-GB, even if your browser is en-US, you do |
Well my main purpose for using something like this is to be able to localize to a language I set it to, not to the users locale set in their browser; so I guess to be able to do that I would have to always set |
Yes, that is correct. |
Ok, thank you! |
Ok since my other questions I have been testing this out and I cannot seem to get it to work in any manner using a
.json
file included as per the instructions under the Usage section, it seems to take no notice of it whatsoever.I then tried the way it was done in the Demo section and I got it to work, however it doesn't seem to honor country code locales, eg:
With that in mind I'm unsure you even set the Language/locale you wish to use if you aren't using the link tag such as:
<link rel="localization" hreflang="en-US" href="american-english.json" type="application/vnd.oftn.l10n+json"/>
Does the script look at the value of the
lang
attribute of thehtml
tag?Anyway, I have it set as such:
<html lang="en-GB">
...and then I have included the main library followed by a
.js
file with this inside it:When I do any translations this will output:
Hello!!!!!!!!
when it should outputHola!
If I only include the
en-GB
locale such as:Then it doesn't do anything and just outputs the same text as I passed in.
Can you please advise?
Thanks!
The text was updated successfully, but these errors were encountered: