alberniweather, to webdev

The fun thing about the substitutions/translations on the website into Nuuchanulth is that after a few words I started to get the hang of the Unicode entities and could put them in without consulting the reference list… just writing another language… to write another language :).
https://www.alberniweather.ca
Code for the forecast grabber is on GitHub: https://github.com/chrisale/ECForecastGrabber

A black screen screenshot of code shows a list of Unicode entries for special characters.
Another code screenshot showing a list of substitutions for various weather words in the raw Unicode.

mjgardner,
@mjgardner@social.sdf.org avatar

@alberniweather Check out the Locale::Maketext framework for localizing text into different languages: https://perldoc.perl.org/Locale::Maketext

The good news is that it ships with , so users don’t have to install anything else.

Here’s a dated but still good article about using it: https://perldoc.perl.org/Locale::Maketext::TPJ13

And feel free to follow @Perl to send and receive messages with the rest of the Perl fediverse community!

jaanus, to random

Today’s edition of “I had to dig a bit in header and think, to understand SwiftUI localization”:

All SwiftUI Label examples in documentation are like the first one, using shorthand convenience initialization.

To have a localized title with the localized text loaded from module resources (typical case if your UI is in SwiftUI package), you need to use the second form.

SwiftUI Label with bundle localization

jaanus, to random

How do you use NSLocalizedString or any other API to correctly load localized strings consistently for tests and previews? Just ran into a bug with this.

Example project: https://github.com/jaanus/PackageStringsBug

Filed FB12146083.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • InstantRegret
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • tacticalgear
  • ethstaker
  • provamag3
  • cisconetworking
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • modclub
  • megavids
  • normalnudes
  • Leos
  • lostlight
  • All magazines