Applying language-specific CSS

This forum is for all Flare issues not related to any of the other categories.

Applying language-specific CSS

Postby okonvick on Mon Aug 05, 2019 6:56 am

When we translate a Flare project from English to Japanese, the used font (Calibri) becomes unusable, since Calibri does not support Japanese characters, which means that it falls down to the system default for Japanese characters, which looks ugly. Is there any way to specify which font to use for Japanese characters? Ideally already in the English original, without having to do any manual edits of the translated project after exporting from Lingo.
okonvick
Propeller Head
 
Posts: 23
Joined: Mon Jan 12, 2015 6:19 am

Re: Applying language-specific CSS

Postby SteveS on Mon Aug 05, 2019 3:31 pm

I'm not sure if this would work, but if the Japenese users are using a font that your English speaking users aren't (ie, it's not on their machines) could you use a font family, listing the Japenese font before the English?
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
SteveS
Propellus Maximus
 
Posts: 1975
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).

Re: Applying language-specific CSS

Postby SteveS on Mon Aug 05, 2019 3:33 pm

You could also look at using conditions to specify a different style sheet depending on the language used by your target's audience.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
SteveS
Propellus Maximus
 
Posts: 1975
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).

Re: Applying language-specific CSS

Postby okonvick on Mon Aug 05, 2019 11:31 pm

Thanks for the advice. Actually, I wanted to stick with system fonts since I've had trouble embedding fonts that are not bundled with windows in the PDF (is it possible, by the way?). After some trying, it seems the simplest option is the right one:
Code: Select all
font-family: 'Segoe UI', 'Meiryo';
okonvick
Propeller Head
 
Posts: 23
Joined: Mon Jan 12, 2015 6:19 am

Re: Applying language-specific CSS

Postby techwriter31 on Sun Aug 11, 2019 3:38 pm

In our projects, we include both English and translated stylesheets to handle this scenario.

For example, our English stylesheet is GlobalEN.css and our Japanese stylesheet is GlobalJA.css.

The GlobalEN.css includes all the style definitions for all mediums.

Then we include only the language-specific differences in the GlobalJA.css style sheet - we specify specific fonts for PDF mediums, we suppress italics, and we include Japanese translations for auto-text included in cross-references, note styles, etc. Then when we generate the Japanese output, we specify the GlobalJA.css as the stylesheet in the target file.

This allows us to maintain the majority of our styles for the various mediums in the English .css and still have separate translated stylesheets, with very little work on our part. It works great for us!

Here's an example:
Code: Select all
/*<meta />*/

@import url('GlobalEN.css');

i/*Suppressing italics in Japanese translated content.*/
{
   font-style: normal;
}

@media PDF_Manual
{
   body
   {
      font-family: 'IPAPGothic', 'MS Gothic';
   }
}


Note that the GlobalEN.css and GlobalJA.css files reside in the same directory.
Kellie
techwriter31
Propellus Maximus
 
Posts: 539
Joined: Wed Mar 05, 2008 10:50 am

Re: Applying language-specific CSS

Postby okonvick on Tue Sep 10, 2019 2:54 am

That sounds like a great advice, techwriter31! Just one thing - how do you apply conditions to what CSS files are used?
okonvick
Propeller Head
 
Posts: 23
Joined: Mon Jan 12, 2015 6:19 am

Re: Applying language-specific CSS

Postby ChoccieMuffin on Tue Sep 10, 2019 3:44 am

okonvick wrote:That sounds like a great advice, techwriter31! Just one thing - how do you apply conditions to what CSS files are used?

Not quite sure I've understood the question, but in each target on the General tab in the Master Stylesheet list click the appropriate language.
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2121
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK


Return to Flare's General Discussion

Who is online

Users browsing this forum: No registered users and 5 guests